|
| 1 | +// Copyright (c) 2016, 2018, 2025, 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 | + |
| 5 | +// Java Management Service Fleets API |
| 6 | +// |
| 7 | +// The APIs for the Fleet Management (https://docs.oracle.com/en-us/iaas/jms/doc/fleet-management.html) feature of Java Management Service to monitor and manage the usage of Java in your enterprise. Use these APIs to manage fleets, configure managed instances to report to fleets, and gain insights into the Java workloads running on these instances by carrying out basic and advanced features. |
| 8 | +// |
| 9 | + |
| 10 | +package jms |
| 11 | + |
| 12 | +import ( |
| 13 | + "fmt" |
| 14 | + "github.com/oracle/oci-go-sdk/v65/common" |
| 15 | + "strings" |
| 16 | +) |
| 17 | + |
| 18 | +// FleetErrorDetails Details of a fleet error. |
| 19 | +type FleetErrorDetails struct { |
| 20 | + |
| 21 | + // The fleet error reason. |
| 22 | + Reason FleetErrorReasonEnum `mandatory:"true" json:"reason"` |
| 23 | + |
| 24 | + // The date and time the resource was _last_ reported to JMS. |
| 25 | + // This is potentially _after_ the specified time period provided by the filters. |
| 26 | + // For example, a resource can be last reported to JMS before the start of a specified time period, |
| 27 | + // if it is also reported during the time period. |
| 28 | + TimeLastSeen *common.SDKTime `mandatory:"true" json:"timeLastSeen"` |
| 29 | + |
| 30 | + // Optional string containing additional details. |
| 31 | + Details *string `mandatory:"false" json:"details"` |
| 32 | +} |
| 33 | + |
| 34 | +func (m FleetErrorDetails) String() string { |
| 35 | + return common.PointerString(m) |
| 36 | +} |
| 37 | + |
| 38 | +// ValidateEnumValue returns an error when providing an unsupported enum value |
| 39 | +// This function is being called during constructing API request process |
| 40 | +// Not recommended for calling this function directly |
| 41 | +func (m FleetErrorDetails) ValidateEnumValue() (bool, error) { |
| 42 | + errMessage := []string{} |
| 43 | + if _, ok := GetMappingFleetErrorReasonEnum(string(m.Reason)); !ok && m.Reason != "" { |
| 44 | + errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for Reason: %s. Supported values are: %s.", m.Reason, strings.Join(GetFleetErrorReasonEnumStringValues(), ","))) |
| 45 | + } |
| 46 | + |
| 47 | + if len(errMessage) > 0 { |
| 48 | + return true, fmt.Errorf(strings.Join(errMessage, "\n")) |
| 49 | + } |
| 50 | + return false, nil |
| 51 | +} |
0 commit comments