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
5from .volume_source_details import VolumeSourceDetails
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 VolumeSourceFromVolumeBackupDetails(VolumeSourceDetails):
12    """
13    Specifies the volume backup.
14    """
15
16    def __init__(self, **kwargs):
17        """
18        Initializes a new VolumeSourceFromVolumeBackupDetails object with values from keyword arguments. The default value of the :py:attr:`~oci.core.models.VolumeSourceFromVolumeBackupDetails.type` attribute
19        of this class is ``volumeBackup`` and it should not be changed.
20        The following keyword arguments are supported (corresponding to the getters/setters of this class):
21
22        :param type:
23            The value to assign to the type property of this VolumeSourceFromVolumeBackupDetails.
24        :type type: str
25
26        :param id:
27            The value to assign to the id property of this VolumeSourceFromVolumeBackupDetails.
28        :type id: str
29
30        """
31        self.swagger_types = {
32            'type': 'str',
33            'id': 'str'
34        }
35
36        self.attribute_map = {
37            'type': 'type',
38            'id': 'id'
39        }
40
41        self._type = None
42        self._id = None
43        self._type = 'volumeBackup'
44
45    @property
46    def id(self):
47        """
48        **[Required]** Gets the id of this VolumeSourceFromVolumeBackupDetails.
49        The OCID of the volume backup.
50
51
52        :return: The id of this VolumeSourceFromVolumeBackupDetails.
53        :rtype: str
54        """
55        return self._id
56
57    @id.setter
58    def id(self, id):
59        """
60        Sets the id of this VolumeSourceFromVolumeBackupDetails.
61        The OCID of the volume backup.
62
63
64        :param id: The id of this VolumeSourceFromVolumeBackupDetails.
65        :type: str
66        """
67        self._id = id
68
69    def __repr__(self):
70        return formatted_flat_dict(self)
71
72    def __eq__(self, other):
73        if other is None:
74            return False
75
76        return self.__dict__ == other.__dict__
77
78    def __ne__(self, other):
79        return not self == other
80