-
Notifications
You must be signed in to change notification settings - Fork 82
/
audit_event.go
74 lines (59 loc) · 3.02 KB
/
audit_event.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// Copyright (c) 2016, 2018, 2022, Oracle and/or its affiliates. All rights reserved.
// 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.
// Code generated. DO NOT EDIT.
// Audit API
//
// API for the Audit Service. Use this API for compliance monitoring in your tenancy.
// For more information, see Overview of Audit (https://docs.cloud.oracle.com/iaas/Content/Audit/Concepts/auditoverview.htm).
// **Tip**: This API is good for queries, but not bulk-export operations.
//
package audit
import (
"fmt"
"github.com/oracle/oci-go-sdk/v65/common"
"strings"
)
// AuditEvent All the attributes of an audit event. For more information, see Viewing Audit Log Events (https://docs.cloud.oracle.com/iaas/Content/Audit/Tasks/viewinglogevents.htm).
type AuditEvent struct {
// The type of event that happened.
// The service that produces the event can also add, remove, or change the meaning of a field.
// A service implementing these type changes would publish a new version of an `eventType` and
// revise the `eventTypeVersion` field.
// Example: `com.oraclecloud.ComputeApi.GetInstance`
EventType *string `mandatory:"true" json:"eventType"`
// The version of the CloudEvents specification. The structure of the envelope follows the
// CloudEvents (https://github.com/cloudevents/spec) industry standard format hosted by the
// Cloud Native Computing Foundation ( CNCF) (https://www.cncf.io/).
// Audit uses version 0.1 specification of the CloudEvents event envelope.
// Example: `0.1`
CloudEventsVersion *string `mandatory:"true" json:"cloudEventsVersion"`
// The version of the event type. This version applies to the payload of the event, not the envelope.
// Use `cloudEventsVersion` to determine the version of the envelope.
// Example: `2.0`
EventTypeVersion *string `mandatory:"true" json:"eventTypeVersion"`
// The source of the event.
// Example: `ComputeApi`
Source *string `mandatory:"true" json:"source"`
// The GUID of the event.
EventId *string `mandatory:"true" json:"eventId"`
// The time the event occurred, expressed in RFC 3339 (https://tools.ietf.org/html/rfc3339) timestamp format.
// Example: `2019-09-18T00:10:59.252Z`
EventTime *common.SDKTime `mandatory:"true" json:"eventTime"`
// The content type of the data contained in `data`.
// Example: `application/json`
ContentType *string `mandatory:"true" json:"contentType"`
Data *Data `mandatory:"true" json:"data"`
}
func (m AuditEvent) String() string {
return common.PointerString(m)
}
// ValidateEnumValue returns an error when providing an unsupported enum value
// This function is being called during constructing API request process
// Not recommended for calling this function directly
func (m AuditEvent) ValidateEnumValue() (bool, error) {
errMessage := []string{}
if len(errMessage) > 0 {
return true, fmt.Errorf(strings.Join(errMessage, "\n"))
}
return false, nil
}