Skip to content

feat(spec): updated the sdk as per the api spec released on 2024-12-26 #60

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
226 changes: 221 additions & 5 deletions modules/vpc/src/main/java/com/ibm/cloud/is/vpc/v1/Vpc.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
* Classes which extend this class:
* - BackupPolicyMatchResourceTypeInstance
* - BackupPolicyMatchResourceTypeVolume
* - BackupPolicyMatchResourceTypeShare
*/
public class BackupPolicy extends GenericModel {

Expand Down Expand Up @@ -78,6 +79,8 @@ public interface LifecycleState {
public interface MatchResourceType {
/** instance. */
String INSTANCE = "instance";
/** share. */
String SHARE = "share";
/** volume. */
String VOLUME = "volume";
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public interface Status {
@SerializedName("status_reasons")
protected List<BackupPolicyJobStatusReason> statusReasons;
@SerializedName("target_snapshots")
protected List<SnapshotReference> targetSnapshots;
protected List<BackupPolicyTargetSnapshot> targetSnapshots;

protected BackupPolicyJob() { }

Expand Down Expand Up @@ -237,7 +237,7 @@ public List<BackupPolicyJobStatusReason> getStatusReasons() {
*
* @return the targetSnapshots
*/
public List<SnapshotReference> getTargetSnapshots() {
public List<BackupPolicyTargetSnapshot> getTargetSnapshots() {
return targetSnapshots;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* Classes which extend this class:
* - BackupPolicyJobSourceVolumeReference
* - BackupPolicyJobSourceInstanceReference
* - BackupPolicyJobSourceShareReference
*/
public class BackupPolicyJobSource extends GenericModel {

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
/*
* (C) Copyright IBM Corp. 2022, 2023, 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.is.vpc.v1.model;

/**
* BackupPolicyJobSourceShareReference.
*/
public class BackupPolicyJobSourceShareReference extends BackupPolicyJobSource {

/**
* The resource type.
*/
public interface ResourceType {
/** share. */
String SHARE = "share";
}


protected BackupPolicyJobSourceShareReference() { }
}

Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ public class BackupPolicyJobStatusReason extends GenericModel {
* - `internal_error`: Internal error (contact IBM support)
* - `snapshot_encryption_key_invalid`: The provided encryption key is unavailable
* - `snapshot_pending`: Cannot delete backup (snapshot) in the `pending` lifecycle state
* - `snapshot_source_unsupported`: The source access control mode does not support
* backups
* - `snapshot_rate_too_high`: The rate of backups for the resource is too high
* - `snapshot_share_limit`: The maximum limit for snapshots on this resource has been
* reached
* - `snapshot_source_unavailable`: The source data is not available (for example,
* because the source is still being created).
* - `snapshot_volume_limit`: The snapshot limit for the source volume has been reached
* - `source_volume_busy`: The source volume has `busy` set (after multiple retries)
* - `source_volume_too_large`: The source volume exceeds the [maximum supported
Expand All @@ -42,6 +49,14 @@ public interface Code {
String SNAPSHOT_ENCRYPTION_KEY_INVALID = "snapshot_encryption_key_invalid";
/** snapshot_pending. */
String SNAPSHOT_PENDING = "snapshot_pending";
/** snapshot_rate_too_high. */
String SNAPSHOT_RATE_TOO_HIGH = "snapshot_rate_too_high";
/** snapshot_share_limit. */
String SNAPSHOT_SHARE_LIMIT = "snapshot_share_limit";
/** snapshot_source_unavailable. */
String SNAPSHOT_SOURCE_UNAVAILABLE = "snapshot_source_unavailable";
/** snapshot_source_unsupported. */
String SNAPSHOT_SOURCE_UNSUPPORTED = "snapshot_source_unsupported";
/** snapshot_volume_limit. */
String SNAPSHOT_VOLUME_LIMIT = "snapshot_volume_limit";
/** source_volume_busy. */
Expand All @@ -66,6 +81,13 @@ protected BackupPolicyJobStatusReason() { }
* - `internal_error`: Internal error (contact IBM support)
* - `snapshot_encryption_key_invalid`: The provided encryption key is unavailable
* - `snapshot_pending`: Cannot delete backup (snapshot) in the `pending` lifecycle state
* - `snapshot_source_unsupported`: The source access control mode does not support
* backups
* - `snapshot_rate_too_high`: The rate of backups for the resource is too high
* - `snapshot_share_limit`: The maximum limit for snapshots on this resource has been
* reached
* - `snapshot_source_unavailable`: The source data is not available (for example,
* because the source is still being created).
* - `snapshot_volume_limit`: The snapshot limit for the source volume has been reached
* - `source_volume_busy`: The source volume has `busy` set (after multiple retries)
* - `source_volume_too_large`: The source volume exceeds the [maximum supported
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
/*
* (C) Copyright IBM Corp. 2022, 2023, 2024.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/

package com.ibm.cloud.is.vpc.v1.model;

/**
* BackupPolicyMatchResourceTypeShare.
*/
public class BackupPolicyMatchResourceTypeShare extends BackupPolicy {

/**
* The health of this resource:
* - `ok`: No abnormal behavior detected
* - `degraded`: Experiencing compromised performance, capacity, or connectivity
* - `faulted`: Completely unreachable, inoperative, or otherwise entirely incapacitated
* - `inapplicable`: The health state does not apply because of the current lifecycle
* state. A resource with a lifecycle state of `failed` or `deleting` will have a
* health state of `inapplicable`. A `pending` resource may also have this state.
*/
public interface HealthState {
/** degraded. */
String DEGRADED = "degraded";
/** faulted. */
String FAULTED = "faulted";
/** inapplicable. */
String INAPPLICABLE = "inapplicable";
/** ok. */
String OK = "ok";
}

/**
* The lifecycle state of the backup policy.
*/
public interface LifecycleState {
/** deleting. */
String DELETING = "deleting";
/** failed. */
String FAILED = "failed";
/** pending. */
String PENDING = "pending";
/** stable. */
String STABLE = "stable";
/** suspended. */
String SUSPENDED = "suspended";
/** updating. */
String UPDATING = "updating";
/** waiting. */
String WAITING = "waiting";
}

/**
* The resource type.
*/
public interface ResourceType {
/** backup_policy. */
String BACKUP_POLICY = "backup_policy";
}

/**
* The resource type this backup policy applies to. Resources that have both a matching type and a matching user tag
* will be subject to the backup policy.
*
* The enumerated values for this property may
* [expand](https://cloud.ibm.com/apidocs/vpc#property-value-expansion) in the future.
*/
public interface MatchResourceType {
/** share. */
String SHARE = "share";
}


protected BackupPolicyMatchResourceTypeShare() { }
}

Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* Classes which extend this class:
* - BackupPolicyPrototypeBackupPolicyMatchResourceTypeVolumePrototype
* - BackupPolicyPrototypeBackupPolicyMatchResourceTypeInstancePrototype
* - BackupPolicyPrototypeBackupPolicyMatchResourceTypeSharePrototype
*/
public class BackupPolicyPrototype extends GenericModel {

Expand All @@ -34,6 +35,8 @@ public class BackupPolicyPrototype extends GenericModel {
public interface MatchResourceType {
/** instance. */
String INSTANCE = "instance";
/** share. */
String SHARE = "share";
/** volume. */
String VOLUME = "volume";
}
Expand Down
Loading