-
Notifications
You must be signed in to change notification settings - Fork 82
/
listing.go
194 lines (146 loc) · 7.81 KB
/
listing.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
// Copyright (c) 2016, 2018, 2023, 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.
// Marketplace Service API
//
// Use the Marketplace API to manage applications in Oracle Cloud Infrastructure Marketplace. For more information, see Overview of Marketplace (https://docs.cloud.oracle.com/Content/Marketplace/Concepts/marketoverview.htm)
//
package marketplace
import (
"fmt"
"github.com/oracle/oci-go-sdk/v65/common"
"strings"
)
// Listing The model for an Oracle Cloud Infrastructure Marketplace listing.
type Listing struct {
// The unique identifier for the listing in Marketplace.
Id *string `mandatory:"false" json:"id"`
// The name of the listing.
Name *string `mandatory:"false" json:"name"`
// The version of the listing.
Version *string `mandatory:"false" json:"version"`
// The tagline of the listing.
Tagline *string `mandatory:"false" json:"tagline"`
// Keywords associated with the listing.
Keywords *string `mandatory:"false" json:"keywords"`
// A short description of the listing.
ShortDescription *string `mandatory:"false" json:"shortDescription"`
// Usage information for the listing.
UsageInformation *string `mandatory:"false" json:"usageInformation"`
// A long description of the listing.
LongDescription *string `mandatory:"false" json:"longDescription"`
// A description of the publisher's licensing model for the listing.
LicenseModelDescription *string `mandatory:"false" json:"licenseModelDescription"`
// System requirements for the listing.
SystemRequirements *string `mandatory:"false" json:"systemRequirements"`
// The release date of the listing.
TimeReleased *common.SDKTime `mandatory:"false" json:"timeReleased"`
// Release notes for the listing.
ReleaseNotes *string `mandatory:"false" json:"releaseNotes"`
// Categories that the listing belongs to.
Categories []string `mandatory:"false" json:"categories"`
Publisher *Publisher `mandatory:"false" json:"publisher"`
// Languages supported by the listing.
Languages []Item `mandatory:"false" json:"languages"`
// Screenshots of the listing.
Screenshots []Screenshot `mandatory:"false" json:"screenshots"`
// Videos of the listing.
Videos []NamedLink `mandatory:"false" json:"videos"`
// Contact information to use to get support from the publisher for the listing.
SupportContacts []SupportContact `mandatory:"false" json:"supportContacts"`
// Links to support resources for the listing.
SupportLinks []NamedLink `mandatory:"false" json:"supportLinks"`
// Links to additional documentation provided by the publisher specifically for the listing.
DocumentationLinks []DocumentationLink `mandatory:"false" json:"documentationLinks"`
Icon *UploadData `mandatory:"false" json:"icon"`
Banner *UploadData `mandatory:"false" json:"banner"`
// The list of compatible architectures supported by the listing
CompatibleArchitectures []ListingCompatibleArchitecturesEnum `mandatory:"false" json:"compatibleArchitectures,omitempty"`
// The regions where you can deploy the listing. (Some listings have restrictions that limit their deployment to United States regions only.)
Regions []Region `mandatory:"false" json:"regions"`
// The listing's package type.
PackageType PackageTypeEnumEnum `mandatory:"false" json:"packageType,omitempty"`
// The default package version.
DefaultPackageVersion *string `mandatory:"false" json:"defaultPackageVersion"`
// Links to reference material.
Links []Link `mandatory:"false" json:"links"`
// Indicates whether the listing is included in Featured Listings.
IsFeatured *bool `mandatory:"false" json:"isFeatured"`
// The publisher category to which the listing belongs. The publisher category informs where the listing appears for use.
ListingType ListingTypeEnum `mandatory:"false" json:"listingType,omitempty"`
// List of operating systems supported by the listing.
SupportedOperatingSystems []OperatingSystem `mandatory:"false" json:"supportedOperatingSystems"`
}
func (m Listing) 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 Listing) ValidateEnumValue() (bool, error) {
errMessage := []string{}
for _, val := range m.CompatibleArchitectures {
if _, ok := GetMappingListingCompatibleArchitecturesEnum(string(val)); !ok && val != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for CompatibleArchitectures: %s. Supported values are: %s.", val, strings.Join(GetListingCompatibleArchitecturesEnumStringValues(), ",")))
}
}
if _, ok := GetMappingPackageTypeEnumEnum(string(m.PackageType)); !ok && m.PackageType != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for PackageType: %s. Supported values are: %s.", m.PackageType, strings.Join(GetPackageTypeEnumEnumStringValues(), ",")))
}
if _, ok := GetMappingListingTypeEnum(string(m.ListingType)); !ok && m.ListingType != "" {
errMessage = append(errMessage, fmt.Sprintf("unsupported enum value for ListingType: %s. Supported values are: %s.", m.ListingType, strings.Join(GetListingTypeEnumStringValues(), ",")))
}
if len(errMessage) > 0 {
return true, fmt.Errorf(strings.Join(errMessage, "\n"))
}
return false, nil
}
// ListingCompatibleArchitecturesEnum Enum with underlying type: string
type ListingCompatibleArchitecturesEnum string
// Set of constants representing the allowable values for ListingCompatibleArchitecturesEnum
const (
ListingCompatibleArchitecturesX86 ListingCompatibleArchitecturesEnum = "X86"
ListingCompatibleArchitecturesArm ListingCompatibleArchitecturesEnum = "ARM"
)
var mappingListingCompatibleArchitecturesEnum = map[string]ListingCompatibleArchitecturesEnum{
"X86": ListingCompatibleArchitecturesX86,
"ARM": ListingCompatibleArchitecturesArm,
}
var mappingListingCompatibleArchitecturesEnumLowerCase = map[string]ListingCompatibleArchitecturesEnum{
"x86": ListingCompatibleArchitecturesX86,
"arm": ListingCompatibleArchitecturesArm,
}
// GetListingCompatibleArchitecturesEnumValues Enumerates the set of values for ListingCompatibleArchitecturesEnum
func GetListingCompatibleArchitecturesEnumValues() []ListingCompatibleArchitecturesEnum {
values := make([]ListingCompatibleArchitecturesEnum, 0)
for _, v := range mappingListingCompatibleArchitecturesEnum {
values = append(values, v)
}
return values
}
// GetListingCompatibleArchitecturesEnumStringValues Enumerates the set of values in String for ListingCompatibleArchitecturesEnum
func GetListingCompatibleArchitecturesEnumStringValues() []string {
return []string{
"X86",
"ARM",
}
}
// GetMappingListingCompatibleArchitecturesEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingListingCompatibleArchitecturesEnum(val string) (ListingCompatibleArchitecturesEnum, bool) {
enum, ok := mappingListingCompatibleArchitecturesEnumLowerCase[strings.ToLower(val)]
return enum, ok
}
// ListingPackageTypeEnum is an alias to type: PackageTypeEnumEnum
// Consider using PackageTypeEnumEnum instead
// Deprecated
type ListingPackageTypeEnum = PackageTypeEnumEnum
// Set of constants representing the allowable values for PackageTypeEnumEnum
// Deprecated
const (
ListingPackageTypeOrchestration PackageTypeEnumEnum = "ORCHESTRATION"
ListingPackageTypeImage PackageTypeEnumEnum = "IMAGE"
)
// GetListingPackageTypeEnumValues Enumerates the set of values for PackageTypeEnumEnum
// Consider using GetPackageTypeEnumEnumValue
// Deprecated
var GetListingPackageTypeEnumValues = GetPackageTypeEnumEnumValues