|
| 1 | +/* |
| 2 | + * (C) Copyright IBM Corp. 2020, 2021, 2022. |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with |
| 5 | + * the License. You may obtain a copy of the License at |
| 6 | + * |
| 7 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | + * |
| 9 | + * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on |
| 10 | + * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the |
| 11 | + * specific language governing permissions and limitations under the License. |
| 12 | + */ |
| 13 | +package com.ibm.cloud.is.vpc.v1.model; |
| 14 | + |
| 15 | +import java.util.Date; |
| 16 | +import java.util.List; |
| 17 | + |
| 18 | +import com.google.gson.annotations.SerializedName; |
| 19 | +import com.ibm.cloud.sdk.core.service.model.GenericModel; |
| 20 | + |
| 21 | +/** |
| 22 | + * BackupPolicy. |
| 23 | + */ |
| 24 | +public class BackupPolicy extends GenericModel { |
| 25 | + |
| 26 | + /** |
| 27 | + * The lifecycle state of the backup policy. |
| 28 | + */ |
| 29 | + public interface LifecycleState { |
| 30 | + /** deleting. */ |
| 31 | + String DELETING = "deleting"; |
| 32 | + /** failed. */ |
| 33 | + String FAILED = "failed"; |
| 34 | + /** pending. */ |
| 35 | + String PENDING = "pending"; |
| 36 | + /** stable. */ |
| 37 | + String STABLE = "stable"; |
| 38 | + /** suspended. */ |
| 39 | + String SUSPENDED = "suspended"; |
| 40 | + /** updating. */ |
| 41 | + String UPDATING = "updating"; |
| 42 | + /** waiting. */ |
| 43 | + String WAITING = "waiting"; |
| 44 | + } |
| 45 | + |
| 46 | + /** |
| 47 | + * The resource type. |
| 48 | + */ |
| 49 | + public interface MatchResourceTypes { |
| 50 | + /** volume. */ |
| 51 | + String VOLUME = "volume"; |
| 52 | + } |
| 53 | + |
| 54 | + /** |
| 55 | + * The resource type. |
| 56 | + */ |
| 57 | + public interface ResourceType { |
| 58 | + /** backup_policy. */ |
| 59 | + String BACKUP_POLICY = "backup_policy"; |
| 60 | + } |
| 61 | + |
| 62 | + @SerializedName("created_at") |
| 63 | + protected Date createdAt; |
| 64 | + protected String crn; |
| 65 | + protected String href; |
| 66 | + protected String id; |
| 67 | + @SerializedName("last_job_completed_at") |
| 68 | + protected Date lastJobCompletedAt; |
| 69 | + @SerializedName("lifecycle_state") |
| 70 | + protected String lifecycleState; |
| 71 | + @SerializedName("match_resource_types") |
| 72 | + protected List<String> matchResourceTypes; |
| 73 | + @SerializedName("match_user_tags") |
| 74 | + protected List<String> matchUserTags; |
| 75 | + protected String name; |
| 76 | + protected List<BackupPolicyPlanReference> plans; |
| 77 | + @SerializedName("resource_group") |
| 78 | + protected ResourceGroupReference resourceGroup; |
| 79 | + @SerializedName("resource_type") |
| 80 | + protected String resourceType; |
| 81 | + |
| 82 | + /** |
| 83 | + * Gets the createdAt. |
| 84 | + * |
| 85 | + * The date and time that the backup policy was created. |
| 86 | + * |
| 87 | + * @return the createdAt |
| 88 | + */ |
| 89 | + public Date getCreatedAt() { |
| 90 | + return createdAt; |
| 91 | + } |
| 92 | + |
| 93 | + /** |
| 94 | + * Gets the crn. |
| 95 | + * |
| 96 | + * The CRN for this backup policy. |
| 97 | + * |
| 98 | + * @return the crn |
| 99 | + */ |
| 100 | + public String getCrn() { |
| 101 | + return crn; |
| 102 | + } |
| 103 | + |
| 104 | + /** |
| 105 | + * Gets the href. |
| 106 | + * |
| 107 | + * The URL for this backup policy. |
| 108 | + * |
| 109 | + * @return the href |
| 110 | + */ |
| 111 | + public String getHref() { |
| 112 | + return href; |
| 113 | + } |
| 114 | + |
| 115 | + /** |
| 116 | + * Gets the id. |
| 117 | + * |
| 118 | + * The unique identifier for this backup policy. |
| 119 | + * |
| 120 | + * @return the id |
| 121 | + */ |
| 122 | + public String getId() { |
| 123 | + return id; |
| 124 | + } |
| 125 | + |
| 126 | + /** |
| 127 | + * Gets the lastJobCompletedAt. |
| 128 | + * |
| 129 | + * The date and time that the most recent job for this backup policy completed. |
| 130 | + * |
| 131 | + * If absent, no job has yet completed for this backup policy. |
| 132 | + * |
| 133 | + * @return the lastJobCompletedAt |
| 134 | + */ |
| 135 | + public Date getLastJobCompletedAt() { |
| 136 | + return lastJobCompletedAt; |
| 137 | + } |
| 138 | + |
| 139 | + /** |
| 140 | + * Gets the lifecycleState. |
| 141 | + * |
| 142 | + * The lifecycle state of the backup policy. |
| 143 | + * |
| 144 | + * @return the lifecycleState |
| 145 | + */ |
| 146 | + public String getLifecycleState() { |
| 147 | + return lifecycleState; |
| 148 | + } |
| 149 | + |
| 150 | + /** |
| 151 | + * Gets the matchResourceTypes. |
| 152 | + * |
| 153 | + * A resource type this backup policy applies to. Resources that have both a matching type and a matching user tag |
| 154 | + * will be subject to the backup policy. |
| 155 | + * |
| 156 | + * The enumerated values for this property will expand in the future. When processing this property, check for and log |
| 157 | + * unknown values. Optionally halt processing and surface the error, or bypass the backup policy on which the |
| 158 | + * unexpected property value was encountered. |
| 159 | + * |
| 160 | + * @return the matchResourceTypes |
| 161 | + */ |
| 162 | + public List<String> getMatchResourceTypes() { |
| 163 | + return matchResourceTypes; |
| 164 | + } |
| 165 | + |
| 166 | + /** |
| 167 | + * Gets the matchUserTags. |
| 168 | + * |
| 169 | + * The user tags this backup policy applies to. Resources that have both a matching user tag and a matching type will |
| 170 | + * be subject to the backup policy. |
| 171 | + * |
| 172 | + * @return the matchUserTags |
| 173 | + */ |
| 174 | + public List<String> getMatchUserTags() { |
| 175 | + return matchUserTags; |
| 176 | + } |
| 177 | + |
| 178 | + /** |
| 179 | + * Gets the name. |
| 180 | + * |
| 181 | + * The unique user-defined name for this backup policy. |
| 182 | + * |
| 183 | + * @return the name |
| 184 | + */ |
| 185 | + public String getName() { |
| 186 | + return name; |
| 187 | + } |
| 188 | + |
| 189 | + /** |
| 190 | + * Gets the plans. |
| 191 | + * |
| 192 | + * The plans for the backup policy. |
| 193 | + * |
| 194 | + * @return the plans |
| 195 | + */ |
| 196 | + public List<BackupPolicyPlanReference> getPlans() { |
| 197 | + return plans; |
| 198 | + } |
| 199 | + |
| 200 | + /** |
| 201 | + * Gets the resourceGroup. |
| 202 | + * |
| 203 | + * The resource group for this backup policy. |
| 204 | + * |
| 205 | + * @return the resourceGroup |
| 206 | + */ |
| 207 | + public ResourceGroupReference getResourceGroup() { |
| 208 | + return resourceGroup; |
| 209 | + } |
| 210 | + |
| 211 | + /** |
| 212 | + * Gets the resourceType. |
| 213 | + * |
| 214 | + * The resource type. |
| 215 | + * |
| 216 | + * @return the resourceType |
| 217 | + */ |
| 218 | + public String getResourceType() { |
| 219 | + return resourceType; |
| 220 | + } |
| 221 | +} |
| 222 | + |
0 commit comments