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