-
Notifications
You must be signed in to change notification settings - Fork 82
/
operation_type.go
192 lines (182 loc) · 10 KB
/
operation_type.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
// 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.
// DevOps API
//
// Use the DevOps API to create DevOps projects, configure code repositories, add artifacts to deploy, build and test software applications, configure target deployment environments, and deploy software applications. For more information, see DevOps (https://docs.cloud.oracle.com/Content/devops/using/home.htm).
//
package devops
import (
"strings"
)
// OperationTypeEnum Enum with underlying type: string
type OperationTypeEnum string
// Set of constants representing the allowable values for OperationTypeEnum
const (
OperationTypeCreateProject OperationTypeEnum = "CREATE_PROJECT"
OperationTypeUpdateProject OperationTypeEnum = "UPDATE_PROJECT"
OperationTypeDeleteProject OperationTypeEnum = "DELETE_PROJECT"
OperationTypeMoveProject OperationTypeEnum = "MOVE_PROJECT"
OperationTypeCreateDeployPipeline OperationTypeEnum = "CREATE_DEPLOY_PIPELINE"
OperationTypeUpdateDeployPipeline OperationTypeEnum = "UPDATE_DEPLOY_PIPELINE"
OperationTypeDeleteDeployPipeline OperationTypeEnum = "DELETE_DEPLOY_PIPELINE"
OperationTypeCreateDeployStage OperationTypeEnum = "CREATE_DEPLOY_STAGE"
OperationTypeUpdateDeployStage OperationTypeEnum = "UPDATE_DEPLOY_STAGE"
OperationTypeDeleteDeployStage OperationTypeEnum = "DELETE_DEPLOY_STAGE"
OperationTypeCreateDeployArtifact OperationTypeEnum = "CREATE_DEPLOY_ARTIFACT"
OperationTypeUpdateDeployArtifact OperationTypeEnum = "UPDATE_DEPLOY_ARTIFACT"
OperationTypeDeleteDeployArtifact OperationTypeEnum = "DELETE_DEPLOY_ARTIFACT"
OperationTypeCreateDeployEnvironment OperationTypeEnum = "CREATE_DEPLOY_ENVIRONMENT"
OperationTypeUpdateDeployEnvironment OperationTypeEnum = "UPDATE_DEPLOY_ENVIRONMENT"
OperationTypeDeleteDeployEnvironment OperationTypeEnum = "DELETE_DEPLOY_ENVIRONMENT"
OperationTypeCreateDeployment OperationTypeEnum = "CREATE_DEPLOYMENT"
OperationTypeUpdateDeployment OperationTypeEnum = "UPDATE_DEPLOYMENT"
OperationTypeDeleteDeployment OperationTypeEnum = "DELETE_DEPLOYMENT"
OperationTypeCreateBuildPipeline OperationTypeEnum = "CREATE_BUILD_PIPELINE"
OperationTypeUpdateBuildPipeline OperationTypeEnum = "UPDATE_BUILD_PIPELINE"
OperationTypeDeleteBuildPipeline OperationTypeEnum = "DELETE_BUILD_PIPELINE"
OperationTypeCreateBuildPipelineStage OperationTypeEnum = "CREATE_BUILD_PIPELINE_STAGE"
OperationTypeUpdateBuildPipelineStage OperationTypeEnum = "UPDATE_BUILD_PIPELINE_STAGE"
OperationTypeDeleteBuildPipelineStage OperationTypeEnum = "DELETE_BUILD_PIPELINE_STAGE"
OperationTypeCreateConnection OperationTypeEnum = "CREATE_CONNECTION"
OperationTypeUpdateConnection OperationTypeEnum = "UPDATE_CONNECTION"
OperationTypeDeleteConnection OperationTypeEnum = "DELETE_CONNECTION"
OperationTypeCreateTrigger OperationTypeEnum = "CREATE_TRIGGER"
OperationTypeUpdateTrigger OperationTypeEnum = "UPDATE_TRIGGER"
OperationTypeDeleteTrigger OperationTypeEnum = "DELETE_TRIGGER"
OperationTypeExecuteTrigger OperationTypeEnum = "EXECUTE_TRIGGER"
OperationTypeCreateRepository OperationTypeEnum = "CREATE_REPOSITORY"
OperationTypeUpdateRepository OperationTypeEnum = "UPDATE_REPOSITORY"
OperationTypeDeleteRepository OperationTypeEnum = "DELETE_REPOSITORY"
OperationTypeMirrorRepository OperationTypeEnum = "MIRROR_REPOSITORY"
)
var mappingOperationTypeEnum = map[string]OperationTypeEnum{
"CREATE_PROJECT": OperationTypeCreateProject,
"UPDATE_PROJECT": OperationTypeUpdateProject,
"DELETE_PROJECT": OperationTypeDeleteProject,
"MOVE_PROJECT": OperationTypeMoveProject,
"CREATE_DEPLOY_PIPELINE": OperationTypeCreateDeployPipeline,
"UPDATE_DEPLOY_PIPELINE": OperationTypeUpdateDeployPipeline,
"DELETE_DEPLOY_PIPELINE": OperationTypeDeleteDeployPipeline,
"CREATE_DEPLOY_STAGE": OperationTypeCreateDeployStage,
"UPDATE_DEPLOY_STAGE": OperationTypeUpdateDeployStage,
"DELETE_DEPLOY_STAGE": OperationTypeDeleteDeployStage,
"CREATE_DEPLOY_ARTIFACT": OperationTypeCreateDeployArtifact,
"UPDATE_DEPLOY_ARTIFACT": OperationTypeUpdateDeployArtifact,
"DELETE_DEPLOY_ARTIFACT": OperationTypeDeleteDeployArtifact,
"CREATE_DEPLOY_ENVIRONMENT": OperationTypeCreateDeployEnvironment,
"UPDATE_DEPLOY_ENVIRONMENT": OperationTypeUpdateDeployEnvironment,
"DELETE_DEPLOY_ENVIRONMENT": OperationTypeDeleteDeployEnvironment,
"CREATE_DEPLOYMENT": OperationTypeCreateDeployment,
"UPDATE_DEPLOYMENT": OperationTypeUpdateDeployment,
"DELETE_DEPLOYMENT": OperationTypeDeleteDeployment,
"CREATE_BUILD_PIPELINE": OperationTypeCreateBuildPipeline,
"UPDATE_BUILD_PIPELINE": OperationTypeUpdateBuildPipeline,
"DELETE_BUILD_PIPELINE": OperationTypeDeleteBuildPipeline,
"CREATE_BUILD_PIPELINE_STAGE": OperationTypeCreateBuildPipelineStage,
"UPDATE_BUILD_PIPELINE_STAGE": OperationTypeUpdateBuildPipelineStage,
"DELETE_BUILD_PIPELINE_STAGE": OperationTypeDeleteBuildPipelineStage,
"CREATE_CONNECTION": OperationTypeCreateConnection,
"UPDATE_CONNECTION": OperationTypeUpdateConnection,
"DELETE_CONNECTION": OperationTypeDeleteConnection,
"CREATE_TRIGGER": OperationTypeCreateTrigger,
"UPDATE_TRIGGER": OperationTypeUpdateTrigger,
"DELETE_TRIGGER": OperationTypeDeleteTrigger,
"EXECUTE_TRIGGER": OperationTypeExecuteTrigger,
"CREATE_REPOSITORY": OperationTypeCreateRepository,
"UPDATE_REPOSITORY": OperationTypeUpdateRepository,
"DELETE_REPOSITORY": OperationTypeDeleteRepository,
"MIRROR_REPOSITORY": OperationTypeMirrorRepository,
}
var mappingOperationTypeEnumLowerCase = map[string]OperationTypeEnum{
"create_project": OperationTypeCreateProject,
"update_project": OperationTypeUpdateProject,
"delete_project": OperationTypeDeleteProject,
"move_project": OperationTypeMoveProject,
"create_deploy_pipeline": OperationTypeCreateDeployPipeline,
"update_deploy_pipeline": OperationTypeUpdateDeployPipeline,
"delete_deploy_pipeline": OperationTypeDeleteDeployPipeline,
"create_deploy_stage": OperationTypeCreateDeployStage,
"update_deploy_stage": OperationTypeUpdateDeployStage,
"delete_deploy_stage": OperationTypeDeleteDeployStage,
"create_deploy_artifact": OperationTypeCreateDeployArtifact,
"update_deploy_artifact": OperationTypeUpdateDeployArtifact,
"delete_deploy_artifact": OperationTypeDeleteDeployArtifact,
"create_deploy_environment": OperationTypeCreateDeployEnvironment,
"update_deploy_environment": OperationTypeUpdateDeployEnvironment,
"delete_deploy_environment": OperationTypeDeleteDeployEnvironment,
"create_deployment": OperationTypeCreateDeployment,
"update_deployment": OperationTypeUpdateDeployment,
"delete_deployment": OperationTypeDeleteDeployment,
"create_build_pipeline": OperationTypeCreateBuildPipeline,
"update_build_pipeline": OperationTypeUpdateBuildPipeline,
"delete_build_pipeline": OperationTypeDeleteBuildPipeline,
"create_build_pipeline_stage": OperationTypeCreateBuildPipelineStage,
"update_build_pipeline_stage": OperationTypeUpdateBuildPipelineStage,
"delete_build_pipeline_stage": OperationTypeDeleteBuildPipelineStage,
"create_connection": OperationTypeCreateConnection,
"update_connection": OperationTypeUpdateConnection,
"delete_connection": OperationTypeDeleteConnection,
"create_trigger": OperationTypeCreateTrigger,
"update_trigger": OperationTypeUpdateTrigger,
"delete_trigger": OperationTypeDeleteTrigger,
"execute_trigger": OperationTypeExecuteTrigger,
"create_repository": OperationTypeCreateRepository,
"update_repository": OperationTypeUpdateRepository,
"delete_repository": OperationTypeDeleteRepository,
"mirror_repository": OperationTypeMirrorRepository,
}
// GetOperationTypeEnumValues Enumerates the set of values for OperationTypeEnum
func GetOperationTypeEnumValues() []OperationTypeEnum {
values := make([]OperationTypeEnum, 0)
for _, v := range mappingOperationTypeEnum {
values = append(values, v)
}
return values
}
// GetOperationTypeEnumStringValues Enumerates the set of values in String for OperationTypeEnum
func GetOperationTypeEnumStringValues() []string {
return []string{
"CREATE_PROJECT",
"UPDATE_PROJECT",
"DELETE_PROJECT",
"MOVE_PROJECT",
"CREATE_DEPLOY_PIPELINE",
"UPDATE_DEPLOY_PIPELINE",
"DELETE_DEPLOY_PIPELINE",
"CREATE_DEPLOY_STAGE",
"UPDATE_DEPLOY_STAGE",
"DELETE_DEPLOY_STAGE",
"CREATE_DEPLOY_ARTIFACT",
"UPDATE_DEPLOY_ARTIFACT",
"DELETE_DEPLOY_ARTIFACT",
"CREATE_DEPLOY_ENVIRONMENT",
"UPDATE_DEPLOY_ENVIRONMENT",
"DELETE_DEPLOY_ENVIRONMENT",
"CREATE_DEPLOYMENT",
"UPDATE_DEPLOYMENT",
"DELETE_DEPLOYMENT",
"CREATE_BUILD_PIPELINE",
"UPDATE_BUILD_PIPELINE",
"DELETE_BUILD_PIPELINE",
"CREATE_BUILD_PIPELINE_STAGE",
"UPDATE_BUILD_PIPELINE_STAGE",
"DELETE_BUILD_PIPELINE_STAGE",
"CREATE_CONNECTION",
"UPDATE_CONNECTION",
"DELETE_CONNECTION",
"CREATE_TRIGGER",
"UPDATE_TRIGGER",
"DELETE_TRIGGER",
"EXECUTE_TRIGGER",
"CREATE_REPOSITORY",
"UPDATE_REPOSITORY",
"DELETE_REPOSITORY",
"MIRROR_REPOSITORY",
}
}
// GetMappingOperationTypeEnum performs case Insensitive comparison on enum value and return the desired enum
func GetMappingOperationTypeEnum(val string) (OperationTypeEnum, bool) {
enum, ok := mappingOperationTypeEnumLowerCase[strings.ToLower(val)]
return enum, ok
}