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 loganalytics
6
7import (
8	"github.com/oracle/oci-go-sdk/common"
9	"net/http"
10)
11
12// DeleteSourceRequest wrapper for the DeleteSource operation
13type DeleteSourceRequest struct {
14
15	// The Log Analytics namespace used for the request.
16	NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"`
17
18	// source name
19	SourceName *string `mandatory:"true" contributesTo:"path" name:"sourceName"`
20
21	// A token that uniquely identifies a request so it can be retried in case of a timeout or
22	// server error without risk of executing that same action again. Retry tokens expire after 24
23	// hours, but can be invalidated before then due to conflicting operations. For example, if a resource
24	// has been deleted and purged from the system, then a retry of the original creation request
25	// might be rejected.
26	OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"`
27
28	// The client request ID for tracing.
29	OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
30
31	// For optimistic concurrency control. In the PUT or DELETE call
32	// for a resource, set the `if-match` parameter to the value of the
33	// etag from a previous GET or POST response for that resource.
34	// The resource will be updated or deleted only if the etag you
35	// provide matches the resource's current etag value.
36	IfMatch *string `mandatory:"false" contributesTo:"header" name:"if-match"`
37
38	// Metadata about the request. This information will not be transmitted to the service, but
39	// represents information that the SDK will consume to drive retry behavior.
40	RequestMetadata common.RequestMetadata
41}
42
43func (request DeleteSourceRequest) String() string {
44	return common.PointerString(request)
45}
46
47// HTTPRequest implements the OCIRequest interface
48func (request DeleteSourceRequest) HTTPRequest(method, path string) (http.Request, error) {
49	return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
50}
51
52// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
53func (request DeleteSourceRequest) RetryPolicy() *common.RetryPolicy {
54	return request.RequestMetadata.RetryPolicy
55}
56
57// DeleteSourceResponse wrapper for the DeleteSource operation
58type DeleteSourceResponse struct {
59
60	// The underlying http response
61	RawResponse *http.Response
62
63	// Unique Oracle-assigned identifier for the request. If you need to contact
64	// Oracle about a particular request, please provide the request ID.
65	OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
66}
67
68func (response DeleteSourceResponse) String() string {
69	return common.PointerString(response)
70}
71
72// HTTPResponse implements the OCIResponse interface
73func (response DeleteSourceResponse) HTTPResponse() *http.Response {
74	return response.RawResponse
75}
76