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// CreateLogAnalyticsEntityTypeRequest wrapper for the CreateLogAnalyticsEntityType operation
13type CreateLogAnalyticsEntityTypeRequest struct {
14
15	// The Log Analytics namespace used for the request.
16	NamespaceName *string `mandatory:"true" contributesTo:"path" name:"namespaceName"`
17
18	// Definition for custom log analytics entity type.
19	CreateLogAnalyticsEntityTypeDetails `contributesTo:"body"`
20
21	// The client request ID for tracing.
22	OpcRequestId *string `mandatory:"false" contributesTo:"header" name:"opc-request-id"`
23
24	// A token that uniquely identifies a request so it can be retried in case of a timeout or
25	// server error without risk of executing that same action again. Retry tokens expire after 24
26	// hours, but can be invalidated before then due to conflicting operations. For example, if a resource
27	// has been deleted and purged from the system, then a retry of the original creation request
28	// might be rejected.
29	OpcRetryToken *string `mandatory:"false" contributesTo:"header" name:"opc-retry-token"`
30
31	// Metadata about the request. This information will not be transmitted to the service, but
32	// represents information that the SDK will consume to drive retry behavior.
33	RequestMetadata common.RequestMetadata
34}
35
36func (request CreateLogAnalyticsEntityTypeRequest) String() string {
37	return common.PointerString(request)
38}
39
40// HTTPRequest implements the OCIRequest interface
41func (request CreateLogAnalyticsEntityTypeRequest) HTTPRequest(method, path string) (http.Request, error) {
42	return common.MakeDefaultHTTPRequestWithTaggedStruct(method, path, request)
43}
44
45// RetryPolicy implements the OCIRetryableRequest interface. This retrieves the specified retry policy.
46func (request CreateLogAnalyticsEntityTypeRequest) RetryPolicy() *common.RetryPolicy {
47	return request.RequestMetadata.RetryPolicy
48}
49
50// CreateLogAnalyticsEntityTypeResponse wrapper for the CreateLogAnalyticsEntityType operation
51type CreateLogAnalyticsEntityTypeResponse struct {
52
53	// The underlying http response
54	RawResponse *http.Response
55
56	// Unique Oracle-assigned identifier for the request. If you need to contact
57	// Oracle about a particular request, please provide the request ID.
58	OpcRequestId *string `presentIn:"header" name:"opc-request-id"`
59}
60
61func (response CreateLogAnalyticsEntityTypeResponse) String() string {
62	return common.PointerString(response)
63}
64
65// HTTPResponse implements the OCIResponse interface
66func (response CreateLogAnalyticsEntityTypeResponse) HTTPResponse() *http.Response {
67	return response.RawResponse
68}
69