1// Copyright (c) 2016, 2018, 2020, Oracle and/or its affiliates. All rights reserved. 2// 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. 3// Code generated. DO NOT EDIT. 4 5// Email Delivery API 6// 7// API for the Email Delivery service. Use this API to send high-volume, application-generated 8// emails. For more information, see Overview of the Email Delivery Service (https://docs.cloud.oracle.com/iaas/Content/Email/Concepts/overview.htm). 9// 10// **Note:** Write actions (POST, UPDATE, DELETE) may take several minutes to propagate and be reflected by the API. If a subsequent read request fails to reflect your changes, wait a few minutes and try again. 11// 12 13package email 14 15import ( 16 "github.com/oracle/oci-go-sdk/common" 17) 18 19// Suppression The full information representing an email suppression. 20type Suppression struct { 21 22 // The OCID of the compartment to contain the suppression. Since 23 // suppressions are at the customer level, this must be the tenancy 24 // OCID. 25 CompartmentId *string `mandatory:"false" json:"compartmentId"` 26 27 // Email address of the suppression. 28 EmailAddress *string `mandatory:"false" json:"emailAddress"` 29 30 // The unique ID of the suppression. 31 Id *string `mandatory:"false" json:"id"` 32 33 // The reason that the email address was suppressed. For more information on the types of bounces, see Suppression List (https://docs.cloud.oracle.com/Content/Email/Concepts/overview.htm#components). 34 Reason SuppressionReasonEnum `mandatory:"false" json:"reason,omitempty"` 35 36 // The date and time the suppression was added in "YYYY-MM-ddThh:mmZ" 37 // format with a Z offset, as defined by RFC 3339. 38 TimeCreated *common.SDKTime `mandatory:"false" json:"timeCreated"` 39} 40 41func (m Suppression) String() string { 42 return common.PointerString(m) 43} 44 45// SuppressionReasonEnum Enum with underlying type: string 46type SuppressionReasonEnum string 47 48// Set of constants representing the allowable values for SuppressionReasonEnum 49const ( 50 SuppressionReasonUnknown SuppressionReasonEnum = "UNKNOWN" 51 SuppressionReasonHardbounce SuppressionReasonEnum = "HARDBOUNCE" 52 SuppressionReasonComplaint SuppressionReasonEnum = "COMPLAINT" 53 SuppressionReasonManual SuppressionReasonEnum = "MANUAL" 54 SuppressionReasonSoftbounce SuppressionReasonEnum = "SOFTBOUNCE" 55 SuppressionReasonUnsubscribe SuppressionReasonEnum = "UNSUBSCRIBE" 56) 57 58var mappingSuppressionReason = map[string]SuppressionReasonEnum{ 59 "UNKNOWN": SuppressionReasonUnknown, 60 "HARDBOUNCE": SuppressionReasonHardbounce, 61 "COMPLAINT": SuppressionReasonComplaint, 62 "MANUAL": SuppressionReasonManual, 63 "SOFTBOUNCE": SuppressionReasonSoftbounce, 64 "UNSUBSCRIBE": SuppressionReasonUnsubscribe, 65} 66 67// GetSuppressionReasonEnumValues Enumerates the set of values for SuppressionReasonEnum 68func GetSuppressionReasonEnumValues() []SuppressionReasonEnum { 69 values := make([]SuppressionReasonEnum, 0) 70 for _, v := range mappingSuppressionReason { 71 values = append(values, v) 72 } 73 return values 74} 75