CreateAnnouncementsPreferencesDetails¶
- class oci.announcements_service.models.CreateAnnouncementsPreferencesDetails(**kwargs)¶
Bases:
BaseCreateAnnouncementsPreferencesDetailsThe object used to create announcement email preferences.
Attributes:
PREFERENCE_TYPE_OPT_IN_TENANT_AND_INFORMATIONAL_ANNOUNCEMENTSA constant which can be used with the preference_type property of a BaseCreateAnnouncementsPreferencesDetails.
A constant which can be used with the preference_type property of a BaseCreateAnnouncementsPreferencesDetails.
A constant which can be used with the preference_type property of a BaseCreateAnnouncementsPreferencesDetails.
Gets the compartment_id of this BaseCreateAnnouncementsPreferencesDetails.
Gets the is_unsubscribed of this BaseCreateAnnouncementsPreferencesDetails.
[Required] Gets the preference_type of this BaseCreateAnnouncementsPreferencesDetails.
Gets the preferred_time_zone of this BaseCreateAnnouncementsPreferencesDetails.
[Required] Gets the type of this BaseCreateAnnouncementsPreferencesDetails.
Methods:
__init__(**kwargs)Initializes a new CreateAnnouncementsPreferencesDetails object with values from keyword arguments.
get_subtype(object_dictionary)Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
- PREFERENCE_TYPE_OPT_IN_TENANT_AND_INFORMATIONAL_ANNOUNCEMENTS = 'OPT_IN_TENANT_AND_INFORMATIONAL_ANNOUNCEMENTS'¶
A constant which can be used with the preference_type property of a BaseCreateAnnouncementsPreferencesDetails. This constant has a value of “OPT_IN_TENANT_AND_INFORMATIONAL_ANNOUNCEMENTS”
- PREFERENCE_TYPE_OPT_IN_TENANT_ANNOUNCEMENTS = 'OPT_IN_TENANT_ANNOUNCEMENTS'¶
A constant which can be used with the preference_type property of a BaseCreateAnnouncementsPreferencesDetails. This constant has a value of “OPT_IN_TENANT_ANNOUNCEMENTS”
- PREFERENCE_TYPE_OPT_OUT_ALL_ANNOUNCEMENTS = 'OPT_OUT_ALL_ANNOUNCEMENTS'¶
A constant which can be used with the preference_type property of a BaseCreateAnnouncementsPreferencesDetails. This constant has a value of “OPT_OUT_ALL_ANNOUNCEMENTS”
- __init__(**kwargs)¶
Initializes a new CreateAnnouncementsPreferencesDetails object with values from keyword arguments. The default value of the
typeattribute of this class isCreateAnnouncementsPreferencesDetailsand it should not be changed. The following keyword arguments are supported (corresponding to the getters/setters of this class):- Parameters
type (str) – The value to assign to the type property of this CreateAnnouncementsPreferencesDetails.
is_unsubscribed (bool) – The value to assign to the is_unsubscribed property of this CreateAnnouncementsPreferencesDetails.
compartment_id (str) – The value to assign to the compartment_id property of this CreateAnnouncementsPreferencesDetails.
preference_type (str) – The value to assign to the preference_type property of this CreateAnnouncementsPreferencesDetails. Allowed values for this property are: “OPT_IN_TENANT_ANNOUNCEMENTS”, “OPT_IN_TENANT_AND_INFORMATIONAL_ANNOUNCEMENTS”, “OPT_OUT_ALL_ANNOUNCEMENTS”
preferred_time_zone (str) – The value to assign to the preferred_time_zone property of this CreateAnnouncementsPreferencesDetails.
- property compartment_id¶
Gets the compartment_id of this BaseCreateAnnouncementsPreferencesDetails. The OCID of the compartment for which you want to manage announcement email preferences. (Specify the tenancy by providing the root compartment OCID.)
- Returns
The compartment_id of this BaseCreateAnnouncementsPreferencesDetails.
- Return type
str
- static get_subtype(object_dictionary)¶
Given the hash representation of a subtype of this class, use the info in the hash to return the class of the subtype.
- property is_unsubscribed¶
Gets the is_unsubscribed of this BaseCreateAnnouncementsPreferencesDetails. A Boolean value to indicate whether the specified compartment chooses to not to receive informational announcements by email. (Manage preferences for receiving announcements by email by specifying the preferenceType attribute instead.)
- Returns
The is_unsubscribed of this BaseCreateAnnouncementsPreferencesDetails.
- Return type
bool
- property preference_type¶
[Required] Gets the preference_type of this BaseCreateAnnouncementsPreferencesDetails. The string representing the user’s preference, whether to opt in to only required announcements, to opt in to all announcements, including informational announcements, or to opt out of all announcements.
Allowed values for this property are: “OPT_IN_TENANT_ANNOUNCEMENTS”, “OPT_IN_TENANT_AND_INFORMATIONAL_ANNOUNCEMENTS”, “OPT_OUT_ALL_ANNOUNCEMENTS”, ‘UNKNOWN_ENUM_VALUE’. Any unrecognized values returned by a service will be mapped to ‘UNKNOWN_ENUM_VALUE’.
- Returns
The preference_type of this BaseCreateAnnouncementsPreferencesDetails.
- Return type
str
- property preferred_time_zone¶
Gets the preferred_time_zone of this BaseCreateAnnouncementsPreferencesDetails. The time zone in which the user prefers to receive announcements. Specify the preference with a value that uses the IANA Time Zone Database format (x-obmcs-time-zone). For example - America/Los_Angeles
- Returns
The preferred_time_zone of this BaseCreateAnnouncementsPreferencesDetails.
- Return type
str
- property type¶
[Required] Gets the type of this BaseCreateAnnouncementsPreferencesDetails. The entity type, which specifies a model that either creates new announcement email preferences or updates existing preferences.
- Returns
The type of this BaseCreateAnnouncementsPreferencesDetails.
- Return type
str