1# coding: utf-8 2# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. 3# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license. 4 5 6from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel # noqa: F401 7from oci.decorators import init_model_state_from_kwargs 8 9 10@init_model_state_from_kwargs 11class VolumeBackupPolicyAssignment(object): 12 """ 13 Specifies the volume that the volume backup policy is assigned to. 14 15 For more information about Oracle defined backup policies and custom backup policies, 16 see `Policy-Based Backups`__. 17 18 __ https://docs.cloud.oracle.com/iaas/Content/Block/Tasks/schedulingvolumebackups.htm 19 """ 20 21 def __init__(self, **kwargs): 22 """ 23 Initializes a new VolumeBackupPolicyAssignment object with values from keyword arguments. 24 The following keyword arguments are supported (corresponding to the getters/setters of this class): 25 26 :param asset_id: 27 The value to assign to the asset_id property of this VolumeBackupPolicyAssignment. 28 :type asset_id: str 29 30 :param id: 31 The value to assign to the id property of this VolumeBackupPolicyAssignment. 32 :type id: str 33 34 :param policy_id: 35 The value to assign to the policy_id property of this VolumeBackupPolicyAssignment. 36 :type policy_id: str 37 38 :param time_created: 39 The value to assign to the time_created property of this VolumeBackupPolicyAssignment. 40 :type time_created: datetime 41 42 """ 43 self.swagger_types = { 44 'asset_id': 'str', 45 'id': 'str', 46 'policy_id': 'str', 47 'time_created': 'datetime' 48 } 49 50 self.attribute_map = { 51 'asset_id': 'assetId', 52 'id': 'id', 53 'policy_id': 'policyId', 54 'time_created': 'timeCreated' 55 } 56 57 self._asset_id = None 58 self._id = None 59 self._policy_id = None 60 self._time_created = None 61 62 @property 63 def asset_id(self): 64 """ 65 **[Required]** Gets the asset_id of this VolumeBackupPolicyAssignment. 66 The OCID of the volume the policy has been assigned to. 67 68 69 :return: The asset_id of this VolumeBackupPolicyAssignment. 70 :rtype: str 71 """ 72 return self._asset_id 73 74 @asset_id.setter 75 def asset_id(self, asset_id): 76 """ 77 Sets the asset_id of this VolumeBackupPolicyAssignment. 78 The OCID of the volume the policy has been assigned to. 79 80 81 :param asset_id: The asset_id of this VolumeBackupPolicyAssignment. 82 :type: str 83 """ 84 self._asset_id = asset_id 85 86 @property 87 def id(self): 88 """ 89 **[Required]** Gets the id of this VolumeBackupPolicyAssignment. 90 The OCID of the volume backup policy assignment. 91 92 93 :return: The id of this VolumeBackupPolicyAssignment. 94 :rtype: str 95 """ 96 return self._id 97 98 @id.setter 99 def id(self, id): 100 """ 101 Sets the id of this VolumeBackupPolicyAssignment. 102 The OCID of the volume backup policy assignment. 103 104 105 :param id: The id of this VolumeBackupPolicyAssignment. 106 :type: str 107 """ 108 self._id = id 109 110 @property 111 def policy_id(self): 112 """ 113 **[Required]** Gets the policy_id of this VolumeBackupPolicyAssignment. 114 The OCID of the volume backup policy that has been assigned to the volume. 115 116 117 :return: The policy_id of this VolumeBackupPolicyAssignment. 118 :rtype: str 119 """ 120 return self._policy_id 121 122 @policy_id.setter 123 def policy_id(self, policy_id): 124 """ 125 Sets the policy_id of this VolumeBackupPolicyAssignment. 126 The OCID of the volume backup policy that has been assigned to the volume. 127 128 129 :param policy_id: The policy_id of this VolumeBackupPolicyAssignment. 130 :type: str 131 """ 132 self._policy_id = policy_id 133 134 @property 135 def time_created(self): 136 """ 137 **[Required]** Gets the time_created of this VolumeBackupPolicyAssignment. 138 The date and time the volume backup policy was assigned to the volume. The format is 139 defined by `RFC3339`__. 140 141 __ https://tools.ietf.org/html/rfc3339 142 143 144 :return: The time_created of this VolumeBackupPolicyAssignment. 145 :rtype: datetime 146 """ 147 return self._time_created 148 149 @time_created.setter 150 def time_created(self, time_created): 151 """ 152 Sets the time_created of this VolumeBackupPolicyAssignment. 153 The date and time the volume backup policy was assigned to the volume. The format is 154 defined by `RFC3339`__. 155 156 __ https://tools.ietf.org/html/rfc3339 157 158 159 :param time_created: The time_created of this VolumeBackupPolicyAssignment. 160 :type: datetime 161 """ 162 self._time_created = time_created 163 164 def __repr__(self): 165 return formatted_flat_dict(self) 166 167 def __eq__(self, other): 168 if other is None: 169 return False 170 171 return self.__dict__ == other.__dict__ 172 173 def __ne__(self, other): 174 return not self == other 175