-
Notifications
You must be signed in to change notification settings - Fork 80
/
management_saved_search_summary.go
120 lines (88 loc) · 5.76 KB
/
management_saved_search_summary.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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
// Copyright (c) 2016, 2018, 2024, 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.
// ManagementDashboard API
//
// API for the Management Dashboard micro-service. Use this API for dashboard and saved search metadata preservation and to perform tasks such as creating a dashboard, creating a saved search, and obtaining a list of dashboards and saved searches in a compartment.
//
//
package managementdashboard
import (
"fmt"
"github.com/oracle/oci-go-sdk/v65/common"
"strings"
)
// ManagementSavedSearchSummary Summary of the properties of a saved search.
type ManagementSavedSearchSummary struct {
// ID of the saved search.
Id *string `mandatory:"true" json:"id"`
// Display name of the saved search.
DisplayName *string `mandatory:"true" json:"displayName"`
// Determines whether the saved search is an Out-of-the-Box (OOB) saved search. Note that OOB saved searches are only provided by Oracle and cannot be modified.
IsOobSavedSearch *bool `mandatory:"true" json:"isOobSavedSearch"`
// OCID of the compartment in which the saved search resides.
CompartmentId *string `mandatory:"true" json:"compartmentId"`
// ID of the service (for example log-analytics) that owns the saved search. Each service has a unique ID.
ProviderId *string `mandatory:"true" json:"providerId"`
// The version of the metadata of the provider. This is useful for provider to version its features and metadata. Any newly created saved search (or dashboard) should use providerVersion 3.0.0.
ProviderVersion *string `mandatory:"true" json:"providerVersion"`
// The user friendly name of the service (for example, Logging Analytics) that owns the saved search.
ProviderName *string `mandatory:"true" json:"providerName"`
// Description of the saved search.
Description *string `mandatory:"true" json:"description"`
// JSON that contains internationalization options.
Nls *interface{} `mandatory:"true" json:"nls"`
// Determines how the saved search is displayed in a dashboard.
Type SavedSearchTypesEnum `mandatory:"true" json:"type"`
// It defines the visualization type of the widget saved search, the UI options of that visualization type, the binding of data to the visualization.
UiConfig *interface{} `mandatory:"true" json:"uiConfig"`
// It defines how data is fetched. A functional saved search needs a valid dataConfig. See examples on how it can be constructed for various data sources.
DataConfig []interface{} `mandatory:"true" json:"dataConfig"`
// The principle id of the user that created this saved search. This is automatically managed by the system. In OCI the value is ignored. In EM it can skipped or otherwise it is ignored in both create and update API and system automatically sets its value.
CreatedBy *string `mandatory:"true" json:"createdBy"`
// The principle id of the user that updated this saved search
UpdatedBy *string `mandatory:"true" json:"updatedBy"`
// Date and time the saved search was created.
TimeCreated *common.SDKTime `mandatory:"true" json:"timeCreated"`
// Date and time the saved search was updated.
TimeUpdated *common.SDKTime `mandatory:"true" json:"timeUpdated"`
// Screen image of the saved search.
ScreenImage *string `mandatory:"true" json:"screenImage"`
// The version of the metadata defined in the API. This is maintained and enforced by dashboard server. Currently it is 2.0.
MetadataVersion *string `mandatory:"true" json:"metadataVersion"`
// The UI template that the saved search uses to render itself.
WidgetTemplate *string `mandatory:"true" json:"widgetTemplate"`
// The View Model that the saved search uses to render itself.
WidgetVM *string `mandatory:"true" json:"widgetVM"`
// OCI lifecycle status. This is automatically managed by the system.
LifecycleState LifecycleStatesEnum `mandatory:"true" json:"lifecycleState"`
// Defines parameters for the saved search.
ParametersConfig []interface{} `mandatory:"false" json:"parametersConfig"`
// Contains configuration for enabling features.
FeaturesConfig *interface{} `mandatory:"false" json:"featuresConfig"`
// Simple key-value pair that is applied without any predefined name, type or scope. Exists for cross-compatibility only.
// Example: `{"bar-key": "value"}`
FreeformTags map[string]string `mandatory:"false" json:"freeformTags"`
// Defined tags for this resource. Each key is predefined and scoped to a namespace.
// Example: `{"foo-namespace": {"bar-key": "value"}}`
DefinedTags map[string]map[string]interface{} `mandatory:"false" json:"definedTags"`
}
func (m ManagementSavedSearchSummary) 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 ManagementSavedSearchSummary) ValidateEnumValue() (bool, error) {
errMessage := []string{}
if _, ok := GetMappingSavedSearchTypesEnum(string(m.Type)); !ok && m.Type != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Type: %s. Supported values are: %s.", m.Type, strings.Join(GetSavedSearchTypesEnumStringValues(), ",")))
}
if _, ok := GetMappingLifecycleStatesEnum(string(m.LifecycleState)); !ok && m.LifecycleState != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for LifecycleState: %s. Supported values are: %s.", m.LifecycleState, strings.Join(GetLifecycleStatesEnumStringValues(), ",")))
}
if len(errMessage) > 0 {
return true, fmt.Errorf(strings.Join(errMessage, "\n"))
}
return false, nil
}