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 5package email 6 7import ( 8 "github.com/oracle/oci-go-sdk/common" 9 "net/http" 10) 11 12// CreateSuppressionRequest wrapper for the CreateSuppression operation 13type CreateSuppressionRequest struct { 14 15 // Adds a single email address to the suppression list for a compartment's tenancy. 16 CreateSuppressionDetails `contributesTo:"body"` 17 18 // The request ID for tracing from the system 19 OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"` 20 21 // Metadata about the request. This information will not be transmitted to the service, but 22 // represents information that the SDK will consume to drive retry behavior. 23 RequestMetadata common.RequestMetadata 24} 25 26func (request CreateSuppressionRequest) String() string { 27 return common.PointerString(request) 28} 29 30// HTTPRequest implements the OCIRequest interface 31func (request CreateSuppressionRequest) HTTPRequest(method, path string) (http.Request, error) { 32 return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request) 33} 34 35// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy. 36func (request CreateSuppressionRequest) RetryPolicy() *common.RetryPolicy { 37 return request.RequestMetadata.RetryPolicy 38} 39 40// CreateSuppressionResponse wrapper for the CreateSuppression operation 41type CreateSuppressionResponse struct { 42 43 // The underlying http response 44 RawResponse *http.Response 45 46 // The Suppression instance 47 Suppression `presentIn:"body"` 48 49 // Unique Oracle-assigned identifier for the request. If you need to contact Oracle about a particular request, please provide the request ID. 50 OpcRequestId *string `presentIn:"header" name:"opc-request-id"` 51} 52 53func (response CreateSuppressionResponse) String() string { 54 return common.PointerString(response) 55} 56 57// HTTPResponse implements the OCIResponse interface 58func (response CreateSuppressionResponse) HTTPResponse() *http.Response { 59 return response.RawResponse 60} 61