-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerate client from commit 82038586 of spec repo
- Loading branch information
ci.datadog-api-spec
committed
Sep 9, 2024
1 parent
ad7f3f6
commit 2b5d36d
Showing
20 changed files
with
2,029 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
api/datadogV1/model_table_widget_text_format_custom_palette_type.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. | ||
// This product includes software developed at Datadog (https://www.datadoghq.com/). | ||
// Copyright 2019-Present Datadog, Inc. | ||
|
||
package datadogV1 | ||
|
||
import ( | ||
"fmt" | ||
|
||
"github.com/DataDog/datadog-api-client-go/v2/api/datadog" | ||
) | ||
|
||
// TableWidgetTextFormatCustomPaletteType Custom color-on-color palette. | ||
type TableWidgetTextFormatCustomPaletteType string | ||
|
||
// List of TableWidgetTextFormatCustomPaletteType. | ||
const ( | ||
TABLEWIDGETTEXTFORMATCUSTOMPALETTETYPE_CUSTOM_BG TableWidgetTextFormatCustomPaletteType = "custom_bg" | ||
) | ||
|
||
var allowedTableWidgetTextFormatCustomPaletteTypeEnumValues = []TableWidgetTextFormatCustomPaletteType{ | ||
TABLEWIDGETTEXTFORMATCUSTOMPALETTETYPE_CUSTOM_BG, | ||
} | ||
|
||
// GetAllowedValues reeturns the list of possible values. | ||
func (v *TableWidgetTextFormatCustomPaletteType) GetAllowedValues() []TableWidgetTextFormatCustomPaletteType { | ||
return allowedTableWidgetTextFormatCustomPaletteTypeEnumValues | ||
} | ||
|
||
// UnmarshalJSON deserializes the given payload. | ||
func (v *TableWidgetTextFormatCustomPaletteType) UnmarshalJSON(src []byte) error { | ||
var value string | ||
err := datadog.Unmarshal(src, &value) | ||
if err != nil { | ||
return err | ||
} | ||
*v = TableWidgetTextFormatCustomPaletteType(value) | ||
return nil | ||
} | ||
|
||
// NewTableWidgetTextFormatCustomPaletteTypeFromValue returns a pointer to a valid TableWidgetTextFormatCustomPaletteType | ||
// for the value passed as argument, or an error if the value passed is not allowed by the enum. | ||
func NewTableWidgetTextFormatCustomPaletteTypeFromValue(v string) (*TableWidgetTextFormatCustomPaletteType, error) { | ||
ev := TableWidgetTextFormatCustomPaletteType(v) | ||
if ev.IsValid() { | ||
return &ev, nil | ||
} | ||
return nil, fmt.Errorf("invalid value '%v' for TableWidgetTextFormatCustomPaletteType: valid values are %v", v, allowedTableWidgetTextFormatCustomPaletteTypeEnumValues) | ||
} | ||
|
||
// IsValid return true if the value is valid for the enum, false otherwise. | ||
func (v TableWidgetTextFormatCustomPaletteType) IsValid() bool { | ||
for _, existing := range allowedTableWidgetTextFormatCustomPaletteTypeEnumValues { | ||
if existing == v { | ||
return true | ||
} | ||
} | ||
return false | ||
} | ||
|
||
// Ptr returns reference to TableWidgetTextFormatCustomPaletteType value. | ||
func (v TableWidgetTextFormatCustomPaletteType) Ptr() *TableWidgetTextFormatCustomPaletteType { | ||
return &v | ||
} |
Oops, something went wrong.