diff --git a/pkg/api/v3/api_beta.go b/pkg/api/v3/api_default.go similarity index 92% rename from pkg/api/v3/api_beta.go rename to pkg/api/v3/api_default.go index 945c2471..9d2d2218 100644 --- a/pkg/api/v3/api_beta.go +++ b/pkg/api/v3/api_default.go @@ -20,12 +20,12 @@ import ( ) -// BetaAPIService BetaAPI service -type BetaAPIService service +// DefaultAPIService DefaultAPI service +type DefaultAPIService service type ApiCreateProjectRequest struct { ctx context.Context - ApiService *BetaAPIService + ApiService *DefaultAPIService createProjectRequest *CreateProjectRequest } @@ -47,7 +47,7 @@ Create a project for the organization. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateProjectRequest */ -func (a *BetaAPIService) CreateProject(ctx context.Context) ApiCreateProjectRequest { +func (a *DefaultAPIService) CreateProject(ctx context.Context) ApiCreateProjectRequest { return ApiCreateProjectRequest{ ApiService: a, ctx: ctx, @@ -56,7 +56,7 @@ func (a *BetaAPIService) CreateProject(ctx context.Context) ApiCreateProjectRequ // Execute executes the request // @return CreateProject200Response -func (a *BetaAPIService) CreateProjectExecute(r ApiCreateProjectRequest) (*CreateProject200Response, *http.Response, error) { +func (a *DefaultAPIService) CreateProjectExecute(r ApiCreateProjectRequest) (*CreateProject200Response, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -64,7 +64,7 @@ func (a *BetaAPIService) CreateProjectExecute(r ApiCreateProjectRequest) (*Creat localVarReturnValue *CreateProject200Response ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BetaAPIService.CreateProject") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateProject") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -150,7 +150,7 @@ func (a *BetaAPIService) CreateProjectExecute(r ApiCreateProjectRequest) (*Creat type ApiCreateRoleRequest struct { ctx context.Context - ApiService *BetaAPIService + ApiService *DefaultAPIService createRoleRequest *CreateRoleRequest } @@ -172,7 +172,7 @@ Create a role for the organization. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateRoleRequest */ -func (a *BetaAPIService) CreateRole(ctx context.Context) ApiCreateRoleRequest { +func (a *DefaultAPIService) CreateRole(ctx context.Context) ApiCreateRoleRequest { return ApiCreateRoleRequest{ ApiService: a, ctx: ctx, @@ -181,7 +181,7 @@ func (a *BetaAPIService) CreateRole(ctx context.Context) ApiCreateRoleRequest { // Execute executes the request // @return CreateRole200Response -func (a *BetaAPIService) CreateRoleExecute(r ApiCreateRoleRequest) (*CreateRole200Response, *http.Response, error) { +func (a *DefaultAPIService) CreateRoleExecute(r ApiCreateRoleRequest) (*CreateRole200Response, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -189,7 +189,7 @@ func (a *BetaAPIService) CreateRoleExecute(r ApiCreateRoleRequest) (*CreateRole2 localVarReturnValue *CreateRole200Response ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BetaAPIService.CreateRole") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateRole") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -275,7 +275,7 @@ func (a *BetaAPIService) CreateRoleExecute(r ApiCreateRoleRequest) (*CreateRole2 type ApiCreateRoleBindingsRequest struct { ctx context.Context - ApiService *BetaAPIService + ApiService *DefaultAPIService createRoleBindingsRequest *CreateRoleBindingsRequest } @@ -297,7 +297,7 @@ Create role bindings. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiCreateRoleBindingsRequest */ -func (a *BetaAPIService) CreateRoleBindings(ctx context.Context) ApiCreateRoleBindingsRequest { +func (a *DefaultAPIService) CreateRoleBindings(ctx context.Context) ApiCreateRoleBindingsRequest { return ApiCreateRoleBindingsRequest{ ApiService: a, ctx: ctx, @@ -306,7 +306,7 @@ func (a *BetaAPIService) CreateRoleBindings(ctx context.Context) ApiCreateRoleBi // Execute executes the request // @return []CreateRoleBindings200ResponseInner -func (a *BetaAPIService) CreateRoleBindingsExecute(r ApiCreateRoleBindingsRequest) ([]CreateRoleBindings200ResponseInner, *http.Response, error) { +func (a *DefaultAPIService) CreateRoleBindingsExecute(r ApiCreateRoleBindingsRequest) ([]CreateRoleBindings200ResponseInner, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -314,7 +314,7 @@ func (a *BetaAPIService) CreateRoleBindingsExecute(r ApiCreateRoleBindingsReques localVarReturnValue []CreateRoleBindings200ResponseInner ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BetaAPIService.CreateRoleBindings") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.CreateRoleBindings") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -400,7 +400,7 @@ func (a *BetaAPIService) CreateRoleBindingsExecute(r ApiCreateRoleBindingsReques type ApiDeleteRoleBindingRequest struct { ctx context.Context - ApiService *BetaAPIService + ApiService *DefaultAPIService bindingId string } @@ -417,7 +417,7 @@ Delete a role binding. @param bindingId The role binding ID @return ApiDeleteRoleBindingRequest */ -func (a *BetaAPIService) DeleteRoleBinding(ctx context.Context, bindingId string) ApiDeleteRoleBindingRequest { +func (a *DefaultAPIService) DeleteRoleBinding(ctx context.Context, bindingId string) ApiDeleteRoleBindingRequest { return ApiDeleteRoleBindingRequest{ ApiService: a, ctx: ctx, @@ -427,7 +427,7 @@ func (a *BetaAPIService) DeleteRoleBinding(ctx context.Context, bindingId string // Execute executes the request // @return CreateRoleBindings200ResponseInner -func (a *BetaAPIService) DeleteRoleBindingExecute(r ApiDeleteRoleBindingRequest) (*CreateRoleBindings200ResponseInner, *http.Response, error) { +func (a *DefaultAPIService) DeleteRoleBindingExecute(r ApiDeleteRoleBindingRequest) (*CreateRoleBindings200ResponseInner, *http.Response, error) { var ( localVarHTTPMethod = http.MethodDelete localVarPostBody interface{} @@ -435,7 +435,7 @@ func (a *BetaAPIService) DeleteRoleBindingExecute(r ApiDeleteRoleBindingRequest) localVarReturnValue *CreateRoleBindings200ResponseInner ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BetaAPIService.DeleteRoleBinding") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.DeleteRoleBinding") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -527,7 +527,7 @@ func (a *BetaAPIService) DeleteRoleBindingExecute(r ApiDeleteRoleBindingRequest) type ApiGetProjectRequest struct { ctx context.Context - ApiService *BetaAPIService + ApiService *DefaultAPIService projectId string } @@ -544,7 +544,7 @@ Get a project by ID. @param projectId The project ID @return ApiGetProjectRequest */ -func (a *BetaAPIService) GetProject(ctx context.Context, projectId string) ApiGetProjectRequest { +func (a *DefaultAPIService) GetProject(ctx context.Context, projectId string) ApiGetProjectRequest { return ApiGetProjectRequest{ ApiService: a, ctx: ctx, @@ -554,7 +554,7 @@ func (a *BetaAPIService) GetProject(ctx context.Context, projectId string) ApiGe // Execute executes the request // @return CreateProject200Response -func (a *BetaAPIService) GetProjectExecute(r ApiGetProjectRequest) (*CreateProject200Response, *http.Response, error) { +func (a *DefaultAPIService) GetProjectExecute(r ApiGetProjectRequest) (*CreateProject200Response, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -562,7 +562,7 @@ func (a *BetaAPIService) GetProjectExecute(r ApiGetProjectRequest) (*CreateProje localVarReturnValue *CreateProject200Response ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BetaAPIService.GetProject") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetProject") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -644,7 +644,7 @@ func (a *BetaAPIService) GetProjectExecute(r ApiGetProjectRequest) (*CreateProje type ApiGetRoleRequest struct { ctx context.Context - ApiService *BetaAPIService + ApiService *DefaultAPIService roleId string } @@ -661,7 +661,7 @@ Get a role by ID. @param roleId The role ID @return ApiGetRoleRequest */ -func (a *BetaAPIService) GetRole(ctx context.Context, roleId string) ApiGetRoleRequest { +func (a *DefaultAPIService) GetRole(ctx context.Context, roleId string) ApiGetRoleRequest { return ApiGetRoleRequest{ ApiService: a, ctx: ctx, @@ -671,7 +671,7 @@ func (a *BetaAPIService) GetRole(ctx context.Context, roleId string) ApiGetRoleR // Execute executes the request // @return CreateRole200Response -func (a *BetaAPIService) GetRoleExecute(r ApiGetRoleRequest) (*CreateRole200Response, *http.Response, error) { +func (a *DefaultAPIService) GetRoleExecute(r ApiGetRoleRequest) (*CreateRole200Response, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -679,7 +679,7 @@ func (a *BetaAPIService) GetRoleExecute(r ApiGetRoleRequest) (*CreateRole200Resp localVarReturnValue *CreateRole200Response ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BetaAPIService.GetRole") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetRole") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -761,7 +761,7 @@ func (a *BetaAPIService) GetRoleExecute(r ApiGetRoleRequest) (*CreateRole200Resp type ApiGetUserRequest struct { ctx context.Context - ApiService *BetaAPIService + ApiService *DefaultAPIService userId string } @@ -778,7 +778,7 @@ Get a user by ID. @param userId The user ID @return ApiGetUserRequest */ -func (a *BetaAPIService) GetUser(ctx context.Context, userId string) ApiGetUserRequest { +func (a *DefaultAPIService) GetUser(ctx context.Context, userId string) ApiGetUserRequest { return ApiGetUserRequest{ ApiService: a, ctx: ctx, @@ -788,7 +788,7 @@ func (a *BetaAPIService) GetUser(ctx context.Context, userId string) ApiGetUserR // Execute executes the request // @return GetUser200Response -func (a *BetaAPIService) GetUserExecute(r ApiGetUserRequest) (*GetUser200Response, *http.Response, error) { +func (a *DefaultAPIService) GetUserExecute(r ApiGetUserRequest) (*GetUser200Response, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -796,7 +796,7 @@ func (a *BetaAPIService) GetUserExecute(r ApiGetUserRequest) (*GetUser200Respons localVarReturnValue *GetUser200Response ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BetaAPIService.GetUser") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.GetUser") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -878,7 +878,7 @@ func (a *BetaAPIService) GetUserExecute(r ApiGetUserRequest) (*GetUser200Respons type ApiInviteUserRequest struct { ctx context.Context - ApiService *BetaAPIService + ApiService *DefaultAPIService inviteUserRequest *InviteUserRequest } @@ -900,7 +900,7 @@ Invite users to the organization, and give them roles. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiInviteUserRequest */ -func (a *BetaAPIService) InviteUser(ctx context.Context) ApiInviteUserRequest { +func (a *DefaultAPIService) InviteUser(ctx context.Context) ApiInviteUserRequest { return ApiInviteUserRequest{ ApiService: a, ctx: ctx, @@ -909,7 +909,7 @@ func (a *BetaAPIService) InviteUser(ctx context.Context) ApiInviteUserRequest { // Execute executes the request // @return []ListUsers200Response -func (a *BetaAPIService) InviteUserExecute(r ApiInviteUserRequest) ([]ListUsers200Response, *http.Response, error) { +func (a *DefaultAPIService) InviteUserExecute(r ApiInviteUserRequest) ([]ListUsers200Response, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPost localVarPostBody interface{} @@ -917,7 +917,7 @@ func (a *BetaAPIService) InviteUserExecute(r ApiInviteUserRequest) ([]ListUsers2 localVarReturnValue []ListUsers200Response ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BetaAPIService.InviteUser") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.InviteUser") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1003,7 +1003,7 @@ func (a *BetaAPIService) InviteUserExecute(r ApiInviteUserRequest) ([]ListUsers2 type ApiListProjectsRequest struct { ctx context.Context - ApiService *BetaAPIService + ApiService *DefaultAPIService cursor *string size *int sortType *string @@ -1053,7 +1053,7 @@ List and search projects of the organization. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListProjectsRequest */ -func (a *BetaAPIService) ListProjects(ctx context.Context) ApiListProjectsRequest { +func (a *DefaultAPIService) ListProjects(ctx context.Context) ApiListProjectsRequest { return ApiListProjectsRequest{ ApiService: a, ctx: ctx, @@ -1062,7 +1062,7 @@ func (a *BetaAPIService) ListProjects(ctx context.Context) ApiListProjectsReques // Execute executes the request // @return ListProjects200Response -func (a *BetaAPIService) ListProjectsExecute(r ApiListProjectsRequest) (*ListProjects200Response, *http.Response, error) { +func (a *DefaultAPIService) ListProjectsExecute(r ApiListProjectsRequest) (*ListProjects200Response, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1070,7 +1070,7 @@ func (a *BetaAPIService) ListProjectsExecute(r ApiListProjectsRequest) (*ListPro localVarReturnValue *ListProjects200Response ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BetaAPIService.ListProjects") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListProjects") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1184,7 +1184,7 @@ func (a *BetaAPIService) ListProjectsExecute(r ApiListProjectsRequest) (*ListPro type ApiListRolesRequest struct { ctx context.Context - ApiService *BetaAPIService + ApiService *DefaultAPIService } func (r ApiListRolesRequest) Execute() (*ListRoles200Response, *http.Response, error) { @@ -1199,7 +1199,7 @@ List and search roles of the organization. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListRolesRequest */ -func (a *BetaAPIService) ListRoles(ctx context.Context) ApiListRolesRequest { +func (a *DefaultAPIService) ListRoles(ctx context.Context) ApiListRolesRequest { return ApiListRolesRequest{ ApiService: a, ctx: ctx, @@ -1208,7 +1208,7 @@ func (a *BetaAPIService) ListRoles(ctx context.Context) ApiListRolesRequest { // Execute executes the request // @return ListRoles200Response -func (a *BetaAPIService) ListRolesExecute(r ApiListRolesRequest) (*ListRoles200Response, *http.Response, error) { +func (a *DefaultAPIService) ListRolesExecute(r ApiListRolesRequest) (*ListRoles200Response, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1216,7 +1216,7 @@ func (a *BetaAPIService) ListRolesExecute(r ApiListRolesRequest) (*ListRoles200R localVarReturnValue *ListRoles200Response ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BetaAPIService.ListRoles") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListRoles") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1297,7 +1297,7 @@ func (a *BetaAPIService) ListRolesExecute(r ApiListRolesRequest) (*ListRoles200R type ApiListUsersRequest struct { ctx context.Context - ApiService *BetaAPIService + ApiService *DefaultAPIService } func (r ApiListUsersRequest) Execute() (*ListUsers200Response, *http.Response, error) { @@ -1312,7 +1312,7 @@ List and search projects of the organization. @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @return ApiListUsersRequest */ -func (a *BetaAPIService) ListUsers(ctx context.Context) ApiListUsersRequest { +func (a *DefaultAPIService) ListUsers(ctx context.Context) ApiListUsersRequest { return ApiListUsersRequest{ ApiService: a, ctx: ctx, @@ -1321,7 +1321,7 @@ func (a *BetaAPIService) ListUsers(ctx context.Context) ApiListUsersRequest { // Execute executes the request // @return ListUsers200Response -func (a *BetaAPIService) ListUsersExecute(r ApiListUsersRequest) (*ListUsers200Response, *http.Response, error) { +func (a *DefaultAPIService) ListUsersExecute(r ApiListUsersRequest) (*ListUsers200Response, *http.Response, error) { var ( localVarHTTPMethod = http.MethodGet localVarPostBody interface{} @@ -1329,7 +1329,7 @@ func (a *BetaAPIService) ListUsersExecute(r ApiListUsersRequest) (*ListUsers200R localVarReturnValue *ListUsers200Response ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BetaAPIService.ListUsers") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.ListUsers") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1410,7 +1410,7 @@ func (a *BetaAPIService) ListUsersExecute(r ApiListUsersRequest) (*ListUsers200R type ApiUpdateProjectRequest struct { ctx context.Context - ApiService *BetaAPIService + ApiService *DefaultAPIService projectId string updateProjectRequest *UpdateProjectRequest } @@ -1434,7 +1434,7 @@ Update a project. @param projectId The project ID @return ApiUpdateProjectRequest */ -func (a *BetaAPIService) UpdateProject(ctx context.Context, projectId string) ApiUpdateProjectRequest { +func (a *DefaultAPIService) UpdateProject(ctx context.Context, projectId string) ApiUpdateProjectRequest { return ApiUpdateProjectRequest{ ApiService: a, ctx: ctx, @@ -1444,7 +1444,7 @@ func (a *BetaAPIService) UpdateProject(ctx context.Context, projectId string) Ap // Execute executes the request // @return CreateProject200Response -func (a *BetaAPIService) UpdateProjectExecute(r ApiUpdateProjectRequest) (*CreateProject200Response, *http.Response, error) { +func (a *DefaultAPIService) UpdateProjectExecute(r ApiUpdateProjectRequest) (*CreateProject200Response, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -1452,7 +1452,7 @@ func (a *BetaAPIService) UpdateProjectExecute(r ApiUpdateProjectRequest) (*Creat localVarReturnValue *CreateProject200Response ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BetaAPIService.UpdateProject") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateProject") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } @@ -1539,7 +1539,7 @@ func (a *BetaAPIService) UpdateProjectExecute(r ApiUpdateProjectRequest) (*Creat type ApiUpdateRoleRequest struct { ctx context.Context - ApiService *BetaAPIService + ApiService *DefaultAPIService roleId string updateRoleRequest *UpdateRoleRequest } @@ -1563,7 +1563,7 @@ Update a role. @param roleId The role ID @return ApiUpdateRoleRequest */ -func (a *BetaAPIService) UpdateRole(ctx context.Context, roleId string) ApiUpdateRoleRequest { +func (a *DefaultAPIService) UpdateRole(ctx context.Context, roleId string) ApiUpdateRoleRequest { return ApiUpdateRoleRequest{ ApiService: a, ctx: ctx, @@ -1573,7 +1573,7 @@ func (a *BetaAPIService) UpdateRole(ctx context.Context, roleId string) ApiUpdat // Execute executes the request // @return CreateRole200Response -func (a *BetaAPIService) UpdateRoleExecute(r ApiUpdateRoleRequest) (*CreateRole200Response, *http.Response, error) { +func (a *DefaultAPIService) UpdateRoleExecute(r ApiUpdateRoleRequest) (*CreateRole200Response, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} @@ -1581,7 +1581,7 @@ func (a *BetaAPIService) UpdateRoleExecute(r ApiUpdateRoleRequest) (*CreateRole2 localVarReturnValue *CreateRole200Response ) - localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "BetaAPIService.UpdateRole") + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "DefaultAPIService.UpdateRole") if err != nil { return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} } diff --git a/pkg/api/v3/api_integrations.go b/pkg/api/v3/api_integrations.go new file mode 100644 index 00000000..9e451afc --- /dev/null +++ b/pkg/api/v3/api_integrations.go @@ -0,0 +1,9502 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" + "reflect" +) + + +// IntegrationsAPIService IntegrationsAPI service +type IntegrationsAPIService service + +type ApiCreateakamaiIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + createakamaiIntegrationRequest *CreateakamaiIntegrationRequest +} + +func (r ApiCreateakamaiIntegrationRequest) CreateakamaiIntegrationRequest(createakamaiIntegrationRequest CreateakamaiIntegrationRequest) ApiCreateakamaiIntegrationRequest { + r.createakamaiIntegrationRequest = &createakamaiIntegrationRequest + return r +} + +func (r ApiCreateakamaiIntegrationRequest) Execute() (*CreateakamaiIntegration200Response, *http.Response, error) { + return r.ApiService.CreateakamaiIntegrationExecute(r) +} + +/* +CreateakamaiIntegration Create Akamai integrations. + +Create a Akamai integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateakamaiIntegrationRequest +*/ +func (a *IntegrationsAPIService) CreateakamaiIntegration(ctx context.Context) ApiCreateakamaiIntegrationRequest { + return ApiCreateakamaiIntegrationRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CreateakamaiIntegration200Response +func (a *IntegrationsAPIService) CreateakamaiIntegrationExecute(r ApiCreateakamaiIntegrationRequest) (*CreateakamaiIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateakamaiIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.CreateakamaiIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/akamai" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createakamaiIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateapigeeIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + createapigeeIntegrationRequest *CreateapigeeIntegrationRequest +} + +func (r ApiCreateapigeeIntegrationRequest) CreateapigeeIntegrationRequest(createapigeeIntegrationRequest CreateapigeeIntegrationRequest) ApiCreateapigeeIntegrationRequest { + r.createapigeeIntegrationRequest = &createapigeeIntegrationRequest + return r +} + +func (r ApiCreateapigeeIntegrationRequest) Execute() (*CreateapigeeIntegration200Response, *http.Response, error) { + return r.ApiService.CreateapigeeIntegrationExecute(r) +} + +/* +CreateapigeeIntegration Create Apigee integrations. + +Create a Apigee integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateapigeeIntegrationRequest +*/ +func (a *IntegrationsAPIService) CreateapigeeIntegration(ctx context.Context) ApiCreateapigeeIntegrationRequest { + return ApiCreateapigeeIntegrationRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CreateapigeeIntegration200Response +func (a *IntegrationsAPIService) CreateapigeeIntegrationExecute(r ApiCreateapigeeIntegrationRequest) (*CreateapigeeIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateapigeeIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.CreateapigeeIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/apigee" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createapigeeIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateawsIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + createawsIntegrationRequest *CreateawsIntegrationRequest +} + +func (r ApiCreateawsIntegrationRequest) CreateawsIntegrationRequest(createawsIntegrationRequest CreateawsIntegrationRequest) ApiCreateawsIntegrationRequest { + r.createawsIntegrationRequest = &createawsIntegrationRequest + return r +} + +func (r ApiCreateawsIntegrationRequest) Execute() (*CreateawsIntegration200Response, *http.Response, error) { + return r.ApiService.CreateawsIntegrationExecute(r) +} + +/* +CreateawsIntegration Create AWS integrations. + +Create a AWS integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateawsIntegrationRequest +*/ +func (a *IntegrationsAPIService) CreateawsIntegration(ctx context.Context) ApiCreateawsIntegrationRequest { + return ApiCreateawsIntegrationRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CreateawsIntegration200Response +func (a *IntegrationsAPIService) CreateawsIntegrationExecute(r ApiCreateawsIntegrationRequest) (*CreateawsIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateawsIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.CreateawsIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/aws" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createawsIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreateazureIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + createazureIntegrationRequest *CreateazureIntegrationRequest +} + +func (r ApiCreateazureIntegrationRequest) CreateazureIntegrationRequest(createazureIntegrationRequest CreateazureIntegrationRequest) ApiCreateazureIntegrationRequest { + r.createazureIntegrationRequest = &createazureIntegrationRequest + return r +} + +func (r ApiCreateazureIntegrationRequest) Execute() (*CreateazureIntegration200Response, *http.Response, error) { + return r.ApiService.CreateazureIntegrationExecute(r) +} + +/* +CreateazureIntegration Create Azure integrations. + +Create a Azure integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateazureIntegrationRequest +*/ +func (a *IntegrationsAPIService) CreateazureIntegration(ctx context.Context) ApiCreateazureIntegrationRequest { + return ApiCreateazureIntegrationRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CreateazureIntegration200Response +func (a *IntegrationsAPIService) CreateazureIntegrationExecute(r ApiCreateazureIntegrationRequest) (*CreateazureIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateazureIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.CreateazureIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/azure" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createazureIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreatebitbucketRepoIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + createbitbucketRepoIntegrationRequest *CreatebitbucketRepoIntegrationRequest +} + +func (r ApiCreatebitbucketRepoIntegrationRequest) CreatebitbucketRepoIntegrationRequest(createbitbucketRepoIntegrationRequest CreatebitbucketRepoIntegrationRequest) ApiCreatebitbucketRepoIntegrationRequest { + r.createbitbucketRepoIntegrationRequest = &createbitbucketRepoIntegrationRequest + return r +} + +func (r ApiCreatebitbucketRepoIntegrationRequest) Execute() (*CreatebitbucketRepoIntegration200Response, *http.Response, error) { + return r.ApiService.CreatebitbucketRepoIntegrationExecute(r) +} + +/* +CreatebitbucketRepoIntegration Create Bitbucket Repo integrations. + +Create a Bitbucket Repo integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreatebitbucketRepoIntegrationRequest +*/ +func (a *IntegrationsAPIService) CreatebitbucketRepoIntegration(ctx context.Context) ApiCreatebitbucketRepoIntegrationRequest { + return ApiCreatebitbucketRepoIntegrationRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CreatebitbucketRepoIntegration200Response +func (a *IntegrationsAPIService) CreatebitbucketRepoIntegrationExecute(r ApiCreatebitbucketRepoIntegrationRequest) (*CreatebitbucketRepoIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatebitbucketRepoIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.CreatebitbucketRepoIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/bitbucket-repo" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createbitbucketRepoIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreatecloudflareIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + createcloudflareIntegrationRequest *CreatecloudflareIntegrationRequest +} + +func (r ApiCreatecloudflareIntegrationRequest) CreatecloudflareIntegrationRequest(createcloudflareIntegrationRequest CreatecloudflareIntegrationRequest) ApiCreatecloudflareIntegrationRequest { + r.createcloudflareIntegrationRequest = &createcloudflareIntegrationRequest + return r +} + +func (r ApiCreatecloudflareIntegrationRequest) Execute() (*CreatecloudflareIntegration200Response, *http.Response, error) { + return r.ApiService.CreatecloudflareIntegrationExecute(r) +} + +/* +CreatecloudflareIntegration Create Cloudflare integrations. + +Create a Cloudflare integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreatecloudflareIntegrationRequest +*/ +func (a *IntegrationsAPIService) CreatecloudflareIntegration(ctx context.Context) ApiCreatecloudflareIntegrationRequest { + return ApiCreatecloudflareIntegrationRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CreatecloudflareIntegration200Response +func (a *IntegrationsAPIService) CreatecloudflareIntegrationExecute(r ApiCreatecloudflareIntegrationRequest) (*CreatecloudflareIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatecloudflareIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.CreatecloudflareIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/cloudflare" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createcloudflareIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreategcpIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + createapigeeIntegrationRequest *CreateapigeeIntegrationRequest +} + +func (r ApiCreategcpIntegrationRequest) CreateapigeeIntegrationRequest(createapigeeIntegrationRequest CreateapigeeIntegrationRequest) ApiCreategcpIntegrationRequest { + r.createapigeeIntegrationRequest = &createapigeeIntegrationRequest + return r +} + +func (r ApiCreategcpIntegrationRequest) Execute() (*CreateapigeeIntegration200Response, *http.Response, error) { + return r.ApiService.CreategcpIntegrationExecute(r) +} + +/* +CreategcpIntegration Create GCP integrations. + +Create a GCP integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreategcpIntegrationRequest +*/ +func (a *IntegrationsAPIService) CreategcpIntegration(ctx context.Context) ApiCreategcpIntegrationRequest { + return ApiCreategcpIntegrationRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CreateapigeeIntegration200Response +func (a *IntegrationsAPIService) CreategcpIntegrationExecute(r ApiCreategcpIntegrationRequest) (*CreateapigeeIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateapigeeIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.CreategcpIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/gcp" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createapigeeIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreategithubIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + createcloudflareIntegrationRequest *CreatecloudflareIntegrationRequest +} + +func (r ApiCreategithubIntegrationRequest) CreatecloudflareIntegrationRequest(createcloudflareIntegrationRequest CreatecloudflareIntegrationRequest) ApiCreategithubIntegrationRequest { + r.createcloudflareIntegrationRequest = &createcloudflareIntegrationRequest + return r +} + +func (r ApiCreategithubIntegrationRequest) Execute() (*CreatecloudflareIntegration200Response, *http.Response, error) { + return r.ApiService.CreategithubIntegrationExecute(r) +} + +/* +CreategithubIntegration Create GitHub integrations. + +Create a GitHub integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreategithubIntegrationRequest +*/ +func (a *IntegrationsAPIService) CreategithubIntegration(ctx context.Context) ApiCreategithubIntegrationRequest { + return ApiCreategithubIntegrationRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CreatecloudflareIntegration200Response +func (a *IntegrationsAPIService) CreategithubIntegrationExecute(r ApiCreategithubIntegrationRequest) (*CreatecloudflareIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatecloudflareIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.CreategithubIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/github" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createcloudflareIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreategitlabIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + creategitlabIntegrationRequest *CreategitlabIntegrationRequest +} + +func (r ApiCreategitlabIntegrationRequest) CreategitlabIntegrationRequest(creategitlabIntegrationRequest CreategitlabIntegrationRequest) ApiCreategitlabIntegrationRequest { + r.creategitlabIntegrationRequest = &creategitlabIntegrationRequest + return r +} + +func (r ApiCreategitlabIntegrationRequest) Execute() (*CreategitlabIntegration200Response, *http.Response, error) { + return r.ApiService.CreategitlabIntegrationExecute(r) +} + +/* +CreategitlabIntegration Create GitLab integrations. + +Create a GitLab integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreategitlabIntegrationRequest +*/ +func (a *IntegrationsAPIService) CreategitlabIntegration(ctx context.Context) ApiCreategitlabIntegrationRequest { + return ApiCreategitlabIntegrationRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CreategitlabIntegration200Response +func (a *IntegrationsAPIService) CreategitlabIntegrationExecute(r ApiCreategitlabIntegrationRequest) (*CreategitlabIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreategitlabIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.CreategitlabIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/gitlab" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.creategitlabIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreatejiraIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + createjiraIntegrationRequest *CreatejiraIntegrationRequest +} + +func (r ApiCreatejiraIntegrationRequest) CreatejiraIntegrationRequest(createjiraIntegrationRequest CreatejiraIntegrationRequest) ApiCreatejiraIntegrationRequest { + r.createjiraIntegrationRequest = &createjiraIntegrationRequest + return r +} + +func (r ApiCreatejiraIntegrationRequest) Execute() (*CreatejiraIntegration200Response, *http.Response, error) { + return r.ApiService.CreatejiraIntegrationExecute(r) +} + +/* +CreatejiraIntegration Create Jira integrations. + +Create a Jira integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreatejiraIntegrationRequest +*/ +func (a *IntegrationsAPIService) CreatejiraIntegration(ctx context.Context) ApiCreatejiraIntegrationRequest { + return ApiCreatejiraIntegrationRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CreatejiraIntegration200Response +func (a *IntegrationsAPIService) CreatejiraIntegrationExecute(r ApiCreatejiraIntegrationRequest) (*CreatejiraIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatejiraIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.CreatejiraIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/jira" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createjiraIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreatekubernetesIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + createkubernetesIntegrationRequest *CreatekubernetesIntegrationRequest +} + +func (r ApiCreatekubernetesIntegrationRequest) CreatekubernetesIntegrationRequest(createkubernetesIntegrationRequest CreatekubernetesIntegrationRequest) ApiCreatekubernetesIntegrationRequest { + r.createkubernetesIntegrationRequest = &createkubernetesIntegrationRequest + return r +} + +func (r ApiCreatekubernetesIntegrationRequest) Execute() (*CreatekubernetesIntegration200Response, *http.Response, error) { + return r.ApiService.CreatekubernetesIntegrationExecute(r) +} + +/* +CreatekubernetesIntegration Create Kubernetes integrations. + +Create a Kubernetes integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreatekubernetesIntegrationRequest +*/ +func (a *IntegrationsAPIService) CreatekubernetesIntegration(ctx context.Context) ApiCreatekubernetesIntegrationRequest { + return ApiCreatekubernetesIntegrationRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CreatekubernetesIntegration200Response +func (a *IntegrationsAPIService) CreatekubernetesIntegrationExecute(r ApiCreatekubernetesIntegrationRequest) (*CreatekubernetesIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatekubernetesIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.CreatekubernetesIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/kubernetes" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createkubernetesIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreatepostmanIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + createcloudflareIntegrationRequest *CreatecloudflareIntegrationRequest +} + +func (r ApiCreatepostmanIntegrationRequest) CreatecloudflareIntegrationRequest(createcloudflareIntegrationRequest CreatecloudflareIntegrationRequest) ApiCreatepostmanIntegrationRequest { + r.createcloudflareIntegrationRequest = &createcloudflareIntegrationRequest + return r +} + +func (r ApiCreatepostmanIntegrationRequest) Execute() (*CreatecloudflareIntegration200Response, *http.Response, error) { + return r.ApiService.CreatepostmanIntegrationExecute(r) +} + +/* +CreatepostmanIntegration Create Postman integrations. + +Create a Postman integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreatepostmanIntegrationRequest +*/ +func (a *IntegrationsAPIService) CreatepostmanIntegration(ctx context.Context) ApiCreatepostmanIntegrationRequest { + return ApiCreatepostmanIntegrationRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CreatecloudflareIntegration200Response +func (a *IntegrationsAPIService) CreatepostmanIntegrationExecute(r ApiCreatepostmanIntegrationRequest) (*CreatecloudflareIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatecloudflareIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.CreatepostmanIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/postman" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createcloudflareIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiCreatewizIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + createwizIntegrationRequest *CreatewizIntegrationRequest +} + +func (r ApiCreatewizIntegrationRequest) CreatewizIntegrationRequest(createwizIntegrationRequest CreatewizIntegrationRequest) ApiCreatewizIntegrationRequest { + r.createwizIntegrationRequest = &createwizIntegrationRequest + return r +} + +func (r ApiCreatewizIntegrationRequest) Execute() (*CreatewizIntegration200Response, *http.Response, error) { + return r.ApiService.CreatewizIntegrationExecute(r) +} + +/* +CreatewizIntegration Create Wiz integrations. + +Create a Wiz integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreatewizIntegrationRequest +*/ +func (a *IntegrationsAPIService) CreatewizIntegration(ctx context.Context) ApiCreatewizIntegrationRequest { + return ApiCreatewizIntegrationRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return CreatewizIntegration200Response +func (a *IntegrationsAPIService) CreatewizIntegrationExecute(r ApiCreatewizIntegrationRequest) (*CreatewizIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatewizIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.CreatewizIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/wiz" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createwizIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteakamaiIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiDeleteakamaiIntegrationRequest) Execute() (*CreateakamaiIntegration200Response, *http.Response, error) { + return r.ApiService.DeleteakamaiIntegrationExecute(r) +} + +/* +DeleteakamaiIntegration Delete Akamai integration. + +Update a Akamai integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiDeleteakamaiIntegrationRequest +*/ +func (a *IntegrationsAPIService) DeleteakamaiIntegration(ctx context.Context, id string) ApiDeleteakamaiIntegrationRequest { + return ApiDeleteakamaiIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreateakamaiIntegration200Response +func (a *IntegrationsAPIService) DeleteakamaiIntegrationExecute(r ApiDeleteakamaiIntegrationRequest) (*CreateakamaiIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateakamaiIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.DeleteakamaiIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/akamai/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteapigeeIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiDeleteapigeeIntegrationRequest) Execute() (*CreateapigeeIntegration200Response, *http.Response, error) { + return r.ApiService.DeleteapigeeIntegrationExecute(r) +} + +/* +DeleteapigeeIntegration Delete Apigee integration. + +Update a Apigee integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiDeleteapigeeIntegrationRequest +*/ +func (a *IntegrationsAPIService) DeleteapigeeIntegration(ctx context.Context, id string) ApiDeleteapigeeIntegrationRequest { + return ApiDeleteapigeeIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreateapigeeIntegration200Response +func (a *IntegrationsAPIService) DeleteapigeeIntegrationExecute(r ApiDeleteapigeeIntegrationRequest) (*CreateapigeeIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateapigeeIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.DeleteapigeeIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/apigee/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteawsIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiDeleteawsIntegrationRequest) Execute() (*CreateawsIntegration200Response, *http.Response, error) { + return r.ApiService.DeleteawsIntegrationExecute(r) +} + +/* +DeleteawsIntegration Delete AWS integration. + +Update a AWS integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiDeleteawsIntegrationRequest +*/ +func (a *IntegrationsAPIService) DeleteawsIntegration(ctx context.Context, id string) ApiDeleteawsIntegrationRequest { + return ApiDeleteawsIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreateawsIntegration200Response +func (a *IntegrationsAPIService) DeleteawsIntegrationExecute(r ApiDeleteawsIntegrationRequest) (*CreateawsIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateawsIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.DeleteawsIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/aws/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteazureIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiDeleteazureIntegrationRequest) Execute() (*CreateazureIntegration200Response, *http.Response, error) { + return r.ApiService.DeleteazureIntegrationExecute(r) +} + +/* +DeleteazureIntegration Delete Azure integration. + +Update a Azure integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiDeleteazureIntegrationRequest +*/ +func (a *IntegrationsAPIService) DeleteazureIntegration(ctx context.Context, id string) ApiDeleteazureIntegrationRequest { + return ApiDeleteazureIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreateazureIntegration200Response +func (a *IntegrationsAPIService) DeleteazureIntegrationExecute(r ApiDeleteazureIntegrationRequest) (*CreateazureIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateazureIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.DeleteazureIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/azure/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeletebitbucketRepoIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiDeletebitbucketRepoIntegrationRequest) Execute() (*CreatebitbucketRepoIntegration200Response, *http.Response, error) { + return r.ApiService.DeletebitbucketRepoIntegrationExecute(r) +} + +/* +DeletebitbucketRepoIntegration Delete Bitbucket Repo integration. + +Update a Bitbucket Repo integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiDeletebitbucketRepoIntegrationRequest +*/ +func (a *IntegrationsAPIService) DeletebitbucketRepoIntegration(ctx context.Context, id string) ApiDeletebitbucketRepoIntegrationRequest { + return ApiDeletebitbucketRepoIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreatebitbucketRepoIntegration200Response +func (a *IntegrationsAPIService) DeletebitbucketRepoIntegrationExecute(r ApiDeletebitbucketRepoIntegrationRequest) (*CreatebitbucketRepoIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatebitbucketRepoIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.DeletebitbucketRepoIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/bitbucket-repo/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeletecloudflareIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiDeletecloudflareIntegrationRequest) Execute() (*CreatecloudflareIntegration200Response, *http.Response, error) { + return r.ApiService.DeletecloudflareIntegrationExecute(r) +} + +/* +DeletecloudflareIntegration Delete Cloudflare integration. + +Update a Cloudflare integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiDeletecloudflareIntegrationRequest +*/ +func (a *IntegrationsAPIService) DeletecloudflareIntegration(ctx context.Context, id string) ApiDeletecloudflareIntegrationRequest { + return ApiDeletecloudflareIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreatecloudflareIntegration200Response +func (a *IntegrationsAPIService) DeletecloudflareIntegrationExecute(r ApiDeletecloudflareIntegrationRequest) (*CreatecloudflareIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatecloudflareIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.DeletecloudflareIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/cloudflare/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeletegcpIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiDeletegcpIntegrationRequest) Execute() (*CreateapigeeIntegration200Response, *http.Response, error) { + return r.ApiService.DeletegcpIntegrationExecute(r) +} + +/* +DeletegcpIntegration Delete GCP integration. + +Update a GCP integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiDeletegcpIntegrationRequest +*/ +func (a *IntegrationsAPIService) DeletegcpIntegration(ctx context.Context, id string) ApiDeletegcpIntegrationRequest { + return ApiDeletegcpIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreateapigeeIntegration200Response +func (a *IntegrationsAPIService) DeletegcpIntegrationExecute(r ApiDeletegcpIntegrationRequest) (*CreateapigeeIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateapigeeIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.DeletegcpIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/gcp/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeletegithubIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiDeletegithubIntegrationRequest) Execute() (*CreatecloudflareIntegration200Response, *http.Response, error) { + return r.ApiService.DeletegithubIntegrationExecute(r) +} + +/* +DeletegithubIntegration Delete GitHub integration. + +Update a GitHub integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiDeletegithubIntegrationRequest +*/ +func (a *IntegrationsAPIService) DeletegithubIntegration(ctx context.Context, id string) ApiDeletegithubIntegrationRequest { + return ApiDeletegithubIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreatecloudflareIntegration200Response +func (a *IntegrationsAPIService) DeletegithubIntegrationExecute(r ApiDeletegithubIntegrationRequest) (*CreatecloudflareIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatecloudflareIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.DeletegithubIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/github/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeletegitlabIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiDeletegitlabIntegrationRequest) Execute() (*CreategitlabIntegration200Response, *http.Response, error) { + return r.ApiService.DeletegitlabIntegrationExecute(r) +} + +/* +DeletegitlabIntegration Delete GitLab integration. + +Update a GitLab integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiDeletegitlabIntegrationRequest +*/ +func (a *IntegrationsAPIService) DeletegitlabIntegration(ctx context.Context, id string) ApiDeletegitlabIntegrationRequest { + return ApiDeletegitlabIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreategitlabIntegration200Response +func (a *IntegrationsAPIService) DeletegitlabIntegrationExecute(r ApiDeletegitlabIntegrationRequest) (*CreategitlabIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreategitlabIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.DeletegitlabIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/gitlab/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeletejiraIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiDeletejiraIntegrationRequest) Execute() (*CreatejiraIntegration200Response, *http.Response, error) { + return r.ApiService.DeletejiraIntegrationExecute(r) +} + +/* +DeletejiraIntegration Delete Jira integration. + +Update a Jira integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiDeletejiraIntegrationRequest +*/ +func (a *IntegrationsAPIService) DeletejiraIntegration(ctx context.Context, id string) ApiDeletejiraIntegrationRequest { + return ApiDeletejiraIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreatejiraIntegration200Response +func (a *IntegrationsAPIService) DeletejiraIntegrationExecute(r ApiDeletejiraIntegrationRequest) (*CreatejiraIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatejiraIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.DeletejiraIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/jira/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeletekubernetesIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiDeletekubernetesIntegrationRequest) Execute() (*CreatekubernetesIntegration200Response, *http.Response, error) { + return r.ApiService.DeletekubernetesIntegrationExecute(r) +} + +/* +DeletekubernetesIntegration Delete Kubernetes integration. + +Update a Kubernetes integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiDeletekubernetesIntegrationRequest +*/ +func (a *IntegrationsAPIService) DeletekubernetesIntegration(ctx context.Context, id string) ApiDeletekubernetesIntegrationRequest { + return ApiDeletekubernetesIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreatekubernetesIntegration200Response +func (a *IntegrationsAPIService) DeletekubernetesIntegrationExecute(r ApiDeletekubernetesIntegrationRequest) (*CreatekubernetesIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatekubernetesIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.DeletekubernetesIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/kubernetes/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeletepostmanIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiDeletepostmanIntegrationRequest) Execute() (*CreatecloudflareIntegration200Response, *http.Response, error) { + return r.ApiService.DeletepostmanIntegrationExecute(r) +} + +/* +DeletepostmanIntegration Delete Postman integration. + +Update a Postman integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiDeletepostmanIntegrationRequest +*/ +func (a *IntegrationsAPIService) DeletepostmanIntegration(ctx context.Context, id string) ApiDeletepostmanIntegrationRequest { + return ApiDeletepostmanIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreatecloudflareIntegration200Response +func (a *IntegrationsAPIService) DeletepostmanIntegrationExecute(r ApiDeletepostmanIntegrationRequest) (*CreatecloudflareIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatecloudflareIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.DeletepostmanIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/postman/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeletewizIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiDeletewizIntegrationRequest) Execute() (*CreatewizIntegration200Response, *http.Response, error) { + return r.ApiService.DeletewizIntegrationExecute(r) +} + +/* +DeletewizIntegration Delete Wiz integration. + +Update a Wiz integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiDeletewizIntegrationRequest +*/ +func (a *IntegrationsAPIService) DeletewizIntegration(ctx context.Context, id string) ApiDeletewizIntegrationRequest { + return ApiDeletewizIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreatewizIntegration200Response +func (a *IntegrationsAPIService) DeletewizIntegrationExecute(r ApiDeletewizIntegrationRequest) (*CreatewizIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatewizIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.DeletewizIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/wiz/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetakamaiIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiGetakamaiIntegrationRequest) Execute() (*CreateakamaiIntegration200Response, *http.Response, error) { + return r.ApiService.GetakamaiIntegrationExecute(r) +} + +/* +GetakamaiIntegration Get Akamai integration. + +Get a Akamai integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiGetakamaiIntegrationRequest +*/ +func (a *IntegrationsAPIService) GetakamaiIntegration(ctx context.Context, id string) ApiGetakamaiIntegrationRequest { + return ApiGetakamaiIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreateakamaiIntegration200Response +func (a *IntegrationsAPIService) GetakamaiIntegrationExecute(r ApiGetakamaiIntegrationRequest) (*CreateakamaiIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateakamaiIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.GetakamaiIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/akamai/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetapigeeIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiGetapigeeIntegrationRequest) Execute() (*CreateapigeeIntegration200Response, *http.Response, error) { + return r.ApiService.GetapigeeIntegrationExecute(r) +} + +/* +GetapigeeIntegration Get Apigee integration. + +Get a Apigee integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiGetapigeeIntegrationRequest +*/ +func (a *IntegrationsAPIService) GetapigeeIntegration(ctx context.Context, id string) ApiGetapigeeIntegrationRequest { + return ApiGetapigeeIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreateapigeeIntegration200Response +func (a *IntegrationsAPIService) GetapigeeIntegrationExecute(r ApiGetapigeeIntegrationRequest) (*CreateapigeeIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateapigeeIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.GetapigeeIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/apigee/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetawsIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiGetawsIntegrationRequest) Execute() (*CreateawsIntegration200Response, *http.Response, error) { + return r.ApiService.GetawsIntegrationExecute(r) +} + +/* +GetawsIntegration Get AWS integration. + +Get a AWS integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiGetawsIntegrationRequest +*/ +func (a *IntegrationsAPIService) GetawsIntegration(ctx context.Context, id string) ApiGetawsIntegrationRequest { + return ApiGetawsIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreateawsIntegration200Response +func (a *IntegrationsAPIService) GetawsIntegrationExecute(r ApiGetawsIntegrationRequest) (*CreateawsIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateawsIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.GetawsIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/aws/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetazureIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiGetazureIntegrationRequest) Execute() (*CreateazureIntegration200Response, *http.Response, error) { + return r.ApiService.GetazureIntegrationExecute(r) +} + +/* +GetazureIntegration Get Azure integration. + +Get a Azure integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiGetazureIntegrationRequest +*/ +func (a *IntegrationsAPIService) GetazureIntegration(ctx context.Context, id string) ApiGetazureIntegrationRequest { + return ApiGetazureIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreateazureIntegration200Response +func (a *IntegrationsAPIService) GetazureIntegrationExecute(r ApiGetazureIntegrationRequest) (*CreateazureIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateazureIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.GetazureIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/azure/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetbitbucketRepoIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiGetbitbucketRepoIntegrationRequest) Execute() (*CreatebitbucketRepoIntegration200Response, *http.Response, error) { + return r.ApiService.GetbitbucketRepoIntegrationExecute(r) +} + +/* +GetbitbucketRepoIntegration Get Bitbucket Repo integration. + +Get a Bitbucket Repo integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiGetbitbucketRepoIntegrationRequest +*/ +func (a *IntegrationsAPIService) GetbitbucketRepoIntegration(ctx context.Context, id string) ApiGetbitbucketRepoIntegrationRequest { + return ApiGetbitbucketRepoIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreatebitbucketRepoIntegration200Response +func (a *IntegrationsAPIService) GetbitbucketRepoIntegrationExecute(r ApiGetbitbucketRepoIntegrationRequest) (*CreatebitbucketRepoIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatebitbucketRepoIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.GetbitbucketRepoIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/bitbucket-repo/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetcloudflareIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiGetcloudflareIntegrationRequest) Execute() (*CreatecloudflareIntegration200Response, *http.Response, error) { + return r.ApiService.GetcloudflareIntegrationExecute(r) +} + +/* +GetcloudflareIntegration Get Cloudflare integration. + +Get a Cloudflare integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiGetcloudflareIntegrationRequest +*/ +func (a *IntegrationsAPIService) GetcloudflareIntegration(ctx context.Context, id string) ApiGetcloudflareIntegrationRequest { + return ApiGetcloudflareIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreatecloudflareIntegration200Response +func (a *IntegrationsAPIService) GetcloudflareIntegrationExecute(r ApiGetcloudflareIntegrationRequest) (*CreatecloudflareIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatecloudflareIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.GetcloudflareIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/cloudflare/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetgcpIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiGetgcpIntegrationRequest) Execute() (*CreateapigeeIntegration200Response, *http.Response, error) { + return r.ApiService.GetgcpIntegrationExecute(r) +} + +/* +GetgcpIntegration Get GCP integration. + +Get a GCP integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiGetgcpIntegrationRequest +*/ +func (a *IntegrationsAPIService) GetgcpIntegration(ctx context.Context, id string) ApiGetgcpIntegrationRequest { + return ApiGetgcpIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreateapigeeIntegration200Response +func (a *IntegrationsAPIService) GetgcpIntegrationExecute(r ApiGetgcpIntegrationRequest) (*CreateapigeeIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateapigeeIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.GetgcpIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/gcp/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetgithubIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiGetgithubIntegrationRequest) Execute() (*CreatecloudflareIntegration200Response, *http.Response, error) { + return r.ApiService.GetgithubIntegrationExecute(r) +} + +/* +GetgithubIntegration Get GitHub integration. + +Get a GitHub integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiGetgithubIntegrationRequest +*/ +func (a *IntegrationsAPIService) GetgithubIntegration(ctx context.Context, id string) ApiGetgithubIntegrationRequest { + return ApiGetgithubIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreatecloudflareIntegration200Response +func (a *IntegrationsAPIService) GetgithubIntegrationExecute(r ApiGetgithubIntegrationRequest) (*CreatecloudflareIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatecloudflareIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.GetgithubIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/github/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetgitlabIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiGetgitlabIntegrationRequest) Execute() (*CreategitlabIntegration200Response, *http.Response, error) { + return r.ApiService.GetgitlabIntegrationExecute(r) +} + +/* +GetgitlabIntegration Get GitLab integration. + +Get a GitLab integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiGetgitlabIntegrationRequest +*/ +func (a *IntegrationsAPIService) GetgitlabIntegration(ctx context.Context, id string) ApiGetgitlabIntegrationRequest { + return ApiGetgitlabIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreategitlabIntegration200Response +func (a *IntegrationsAPIService) GetgitlabIntegrationExecute(r ApiGetgitlabIntegrationRequest) (*CreategitlabIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreategitlabIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.GetgitlabIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/gitlab/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetjiraIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiGetjiraIntegrationRequest) Execute() (*CreatejiraIntegration200Response, *http.Response, error) { + return r.ApiService.GetjiraIntegrationExecute(r) +} + +/* +GetjiraIntegration Get Jira integration. + +Get a Jira integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiGetjiraIntegrationRequest +*/ +func (a *IntegrationsAPIService) GetjiraIntegration(ctx context.Context, id string) ApiGetjiraIntegrationRequest { + return ApiGetjiraIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreatejiraIntegration200Response +func (a *IntegrationsAPIService) GetjiraIntegrationExecute(r ApiGetjiraIntegrationRequest) (*CreatejiraIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatejiraIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.GetjiraIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/jira/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetkubernetesIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiGetkubernetesIntegrationRequest) Execute() (*CreatekubernetesIntegration200Response, *http.Response, error) { + return r.ApiService.GetkubernetesIntegrationExecute(r) +} + +/* +GetkubernetesIntegration Get Kubernetes integration. + +Get a Kubernetes integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiGetkubernetesIntegrationRequest +*/ +func (a *IntegrationsAPIService) GetkubernetesIntegration(ctx context.Context, id string) ApiGetkubernetesIntegrationRequest { + return ApiGetkubernetesIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreatekubernetesIntegration200Response +func (a *IntegrationsAPIService) GetkubernetesIntegrationExecute(r ApiGetkubernetesIntegrationRequest) (*CreatekubernetesIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatekubernetesIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.GetkubernetesIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/kubernetes/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetpostmanIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiGetpostmanIntegrationRequest) Execute() (*CreatecloudflareIntegration200Response, *http.Response, error) { + return r.ApiService.GetpostmanIntegrationExecute(r) +} + +/* +GetpostmanIntegration Get Postman integration. + +Get a Postman integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiGetpostmanIntegrationRequest +*/ +func (a *IntegrationsAPIService) GetpostmanIntegration(ctx context.Context, id string) ApiGetpostmanIntegrationRequest { + return ApiGetpostmanIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreatecloudflareIntegration200Response +func (a *IntegrationsAPIService) GetpostmanIntegrationExecute(r ApiGetpostmanIntegrationRequest) (*CreatecloudflareIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatecloudflareIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.GetpostmanIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/postman/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetwizIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string +} + +func (r ApiGetwizIntegrationRequest) Execute() (*CreatewizIntegration200Response, *http.Response, error) { + return r.ApiService.GetwizIntegrationExecute(r) +} + +/* +GetwizIntegration Get Wiz integration. + +Get a Wiz integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiGetwizIntegrationRequest +*/ +func (a *IntegrationsAPIService) GetwizIntegration(ctx context.Context, id string) ApiGetwizIntegrationRequest { + return ApiGetwizIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreatewizIntegration200Response +func (a *IntegrationsAPIService) GetwizIntegrationExecute(r ApiGetwizIntegrationRequest) (*CreatewizIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatewizIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.GetwizIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/wiz/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListakamaiIntegrationsRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + cursor *string + size *int + sortType *string + sortDirection *string + projectIds *[]string + ids *string + search *string +} + +// The cursor to start the pagination from. Returned by the previous page response. If not provided, the first page will be returned. +func (r ApiListakamaiIntegrationsRequest) Cursor(cursor string) ApiListakamaiIntegrationsRequest { + r.cursor = &cursor + return r +} + +// The number of items to return per page +func (r ApiListakamaiIntegrationsRequest) Size(size int) ApiListakamaiIntegrationsRequest { + r.size = &size + return r +} + +// The type to sort by +func (r ApiListakamaiIntegrationsRequest) SortType(sortType string) ApiListakamaiIntegrationsRequest { + r.sortType = &sortType + return r +} + +// The direction to sort by +func (r ApiListakamaiIntegrationsRequest) SortDirection(sortDirection string) ApiListakamaiIntegrationsRequest { + r.sortDirection = &sortDirection + return r +} + +// Filter by project IDs +func (r ApiListakamaiIntegrationsRequest) ProjectIds(projectIds []string) ApiListakamaiIntegrationsRequest { + r.projectIds = &projectIds + return r +} + +// Filter by integration IDs +func (r ApiListakamaiIntegrationsRequest) Ids(ids string) ApiListakamaiIntegrationsRequest { + r.ids = &ids + return r +} + +// Search term to filter integrations by name or description +func (r ApiListakamaiIntegrationsRequest) Search(search string) ApiListakamaiIntegrationsRequest { + r.search = &search + return r +} + +func (r ApiListakamaiIntegrationsRequest) Execute() (*ListakamaiIntegrations200Response, *http.Response, error) { + return r.ApiService.ListakamaiIntegrationsExecute(r) +} + +/* +ListakamaiIntegrations List Akamai integrations. + +List and search Akamai integrations of the organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListakamaiIntegrationsRequest +*/ +func (a *IntegrationsAPIService) ListakamaiIntegrations(ctx context.Context) ApiListakamaiIntegrationsRequest { + return ApiListakamaiIntegrationsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ListakamaiIntegrations200Response +func (a *IntegrationsAPIService) ListakamaiIntegrationsExecute(r ApiListakamaiIntegrationsRequest) (*ListakamaiIntegrations200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListakamaiIntegrations200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.ListakamaiIntegrations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/akamai" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "form", "") + } else { + var defaultValue int = 50 + parameterAddToHeaderOrQuery(localVarQueryParams, "size", defaultValue, "form", "") + r.size = &defaultValue + } + if r.sortType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortType", r.sortType, "form", "") + } + if r.sortDirection != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", r.sortDirection, "form", "") + } else { + var defaultValue string = "asc" + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", defaultValue, "form", "") + r.sortDirection = &defaultValue + } + if r.projectIds != nil { + t := *r.projectIds + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", s.Index(i).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", t, "form", "multi") + } + } + if r.ids != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ids", r.ids, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ListProfiles400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListapigeeIntegrationsRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + cursor *string + size *int + sortType *string + sortDirection *string + projectIds *[]string + ids *string + search *string +} + +// The cursor to start the pagination from. Returned by the previous page response. If not provided, the first page will be returned. +func (r ApiListapigeeIntegrationsRequest) Cursor(cursor string) ApiListapigeeIntegrationsRequest { + r.cursor = &cursor + return r +} + +// The number of items to return per page +func (r ApiListapigeeIntegrationsRequest) Size(size int) ApiListapigeeIntegrationsRequest { + r.size = &size + return r +} + +// The type to sort by +func (r ApiListapigeeIntegrationsRequest) SortType(sortType string) ApiListapigeeIntegrationsRequest { + r.sortType = &sortType + return r +} + +// The direction to sort by +func (r ApiListapigeeIntegrationsRequest) SortDirection(sortDirection string) ApiListapigeeIntegrationsRequest { + r.sortDirection = &sortDirection + return r +} + +// Filter by project IDs +func (r ApiListapigeeIntegrationsRequest) ProjectIds(projectIds []string) ApiListapigeeIntegrationsRequest { + r.projectIds = &projectIds + return r +} + +// Filter by integration IDs +func (r ApiListapigeeIntegrationsRequest) Ids(ids string) ApiListapigeeIntegrationsRequest { + r.ids = &ids + return r +} + +// Search term to filter integrations by name or description +func (r ApiListapigeeIntegrationsRequest) Search(search string) ApiListapigeeIntegrationsRequest { + r.search = &search + return r +} + +func (r ApiListapigeeIntegrationsRequest) Execute() (*ListakamaiIntegrations200Response, *http.Response, error) { + return r.ApiService.ListapigeeIntegrationsExecute(r) +} + +/* +ListapigeeIntegrations List Apigee integrations. + +List and search Apigee integrations of the organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListapigeeIntegrationsRequest +*/ +func (a *IntegrationsAPIService) ListapigeeIntegrations(ctx context.Context) ApiListapigeeIntegrationsRequest { + return ApiListapigeeIntegrationsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ListakamaiIntegrations200Response +func (a *IntegrationsAPIService) ListapigeeIntegrationsExecute(r ApiListapigeeIntegrationsRequest) (*ListakamaiIntegrations200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListakamaiIntegrations200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.ListapigeeIntegrations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/apigee" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "form", "") + } else { + var defaultValue int = 50 + parameterAddToHeaderOrQuery(localVarQueryParams, "size", defaultValue, "form", "") + r.size = &defaultValue + } + if r.sortType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortType", r.sortType, "form", "") + } + if r.sortDirection != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", r.sortDirection, "form", "") + } else { + var defaultValue string = "asc" + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", defaultValue, "form", "") + r.sortDirection = &defaultValue + } + if r.projectIds != nil { + t := *r.projectIds + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", s.Index(i).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", t, "form", "multi") + } + } + if r.ids != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ids", r.ids, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ListProfiles400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListawsIntegrationsRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + cursor *string + size *int + sortType *string + sortDirection *string + projectIds *[]string + ids *string + search *string +} + +// The cursor to start the pagination from. Returned by the previous page response. If not provided, the first page will be returned. +func (r ApiListawsIntegrationsRequest) Cursor(cursor string) ApiListawsIntegrationsRequest { + r.cursor = &cursor + return r +} + +// The number of items to return per page +func (r ApiListawsIntegrationsRequest) Size(size int) ApiListawsIntegrationsRequest { + r.size = &size + return r +} + +// The type to sort by +func (r ApiListawsIntegrationsRequest) SortType(sortType string) ApiListawsIntegrationsRequest { + r.sortType = &sortType + return r +} + +// The direction to sort by +func (r ApiListawsIntegrationsRequest) SortDirection(sortDirection string) ApiListawsIntegrationsRequest { + r.sortDirection = &sortDirection + return r +} + +// Filter by project IDs +func (r ApiListawsIntegrationsRequest) ProjectIds(projectIds []string) ApiListawsIntegrationsRequest { + r.projectIds = &projectIds + return r +} + +// Filter by integration IDs +func (r ApiListawsIntegrationsRequest) Ids(ids string) ApiListawsIntegrationsRequest { + r.ids = &ids + return r +} + +// Search term to filter integrations by name or description +func (r ApiListawsIntegrationsRequest) Search(search string) ApiListawsIntegrationsRequest { + r.search = &search + return r +} + +func (r ApiListawsIntegrationsRequest) Execute() (*ListakamaiIntegrations200Response, *http.Response, error) { + return r.ApiService.ListawsIntegrationsExecute(r) +} + +/* +ListawsIntegrations List AWS integrations. + +List and search AWS integrations of the organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListawsIntegrationsRequest +*/ +func (a *IntegrationsAPIService) ListawsIntegrations(ctx context.Context) ApiListawsIntegrationsRequest { + return ApiListawsIntegrationsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ListakamaiIntegrations200Response +func (a *IntegrationsAPIService) ListawsIntegrationsExecute(r ApiListawsIntegrationsRequest) (*ListakamaiIntegrations200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListakamaiIntegrations200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.ListawsIntegrations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/aws" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "form", "") + } else { + var defaultValue int = 50 + parameterAddToHeaderOrQuery(localVarQueryParams, "size", defaultValue, "form", "") + r.size = &defaultValue + } + if r.sortType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortType", r.sortType, "form", "") + } + if r.sortDirection != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", r.sortDirection, "form", "") + } else { + var defaultValue string = "asc" + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", defaultValue, "form", "") + r.sortDirection = &defaultValue + } + if r.projectIds != nil { + t := *r.projectIds + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", s.Index(i).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", t, "form", "multi") + } + } + if r.ids != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ids", r.ids, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ListProfiles400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListazureIntegrationsRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + cursor *string + size *int + sortType *string + sortDirection *string + projectIds *[]string + ids *string + search *string +} + +// The cursor to start the pagination from. Returned by the previous page response. If not provided, the first page will be returned. +func (r ApiListazureIntegrationsRequest) Cursor(cursor string) ApiListazureIntegrationsRequest { + r.cursor = &cursor + return r +} + +// The number of items to return per page +func (r ApiListazureIntegrationsRequest) Size(size int) ApiListazureIntegrationsRequest { + r.size = &size + return r +} + +// The type to sort by +func (r ApiListazureIntegrationsRequest) SortType(sortType string) ApiListazureIntegrationsRequest { + r.sortType = &sortType + return r +} + +// The direction to sort by +func (r ApiListazureIntegrationsRequest) SortDirection(sortDirection string) ApiListazureIntegrationsRequest { + r.sortDirection = &sortDirection + return r +} + +// Filter by project IDs +func (r ApiListazureIntegrationsRequest) ProjectIds(projectIds []string) ApiListazureIntegrationsRequest { + r.projectIds = &projectIds + return r +} + +// Filter by integration IDs +func (r ApiListazureIntegrationsRequest) Ids(ids string) ApiListazureIntegrationsRequest { + r.ids = &ids + return r +} + +// Search term to filter integrations by name or description +func (r ApiListazureIntegrationsRequest) Search(search string) ApiListazureIntegrationsRequest { + r.search = &search + return r +} + +func (r ApiListazureIntegrationsRequest) Execute() (*ListakamaiIntegrations200Response, *http.Response, error) { + return r.ApiService.ListazureIntegrationsExecute(r) +} + +/* +ListazureIntegrations List Azure integrations. + +List and search Azure integrations of the organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListazureIntegrationsRequest +*/ +func (a *IntegrationsAPIService) ListazureIntegrations(ctx context.Context) ApiListazureIntegrationsRequest { + return ApiListazureIntegrationsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ListakamaiIntegrations200Response +func (a *IntegrationsAPIService) ListazureIntegrationsExecute(r ApiListazureIntegrationsRequest) (*ListakamaiIntegrations200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListakamaiIntegrations200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.ListazureIntegrations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/azure" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "form", "") + } else { + var defaultValue int = 50 + parameterAddToHeaderOrQuery(localVarQueryParams, "size", defaultValue, "form", "") + r.size = &defaultValue + } + if r.sortType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortType", r.sortType, "form", "") + } + if r.sortDirection != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", r.sortDirection, "form", "") + } else { + var defaultValue string = "asc" + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", defaultValue, "form", "") + r.sortDirection = &defaultValue + } + if r.projectIds != nil { + t := *r.projectIds + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", s.Index(i).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", t, "form", "multi") + } + } + if r.ids != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ids", r.ids, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ListProfiles400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListbitbucketRepoIntegrationsRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + cursor *string + size *int + sortType *string + sortDirection *string + projectIds *[]string + ids *string + search *string +} + +// The cursor to start the pagination from. Returned by the previous page response. If not provided, the first page will be returned. +func (r ApiListbitbucketRepoIntegrationsRequest) Cursor(cursor string) ApiListbitbucketRepoIntegrationsRequest { + r.cursor = &cursor + return r +} + +// The number of items to return per page +func (r ApiListbitbucketRepoIntegrationsRequest) Size(size int) ApiListbitbucketRepoIntegrationsRequest { + r.size = &size + return r +} + +// The type to sort by +func (r ApiListbitbucketRepoIntegrationsRequest) SortType(sortType string) ApiListbitbucketRepoIntegrationsRequest { + r.sortType = &sortType + return r +} + +// The direction to sort by +func (r ApiListbitbucketRepoIntegrationsRequest) SortDirection(sortDirection string) ApiListbitbucketRepoIntegrationsRequest { + r.sortDirection = &sortDirection + return r +} + +// Filter by project IDs +func (r ApiListbitbucketRepoIntegrationsRequest) ProjectIds(projectIds []string) ApiListbitbucketRepoIntegrationsRequest { + r.projectIds = &projectIds + return r +} + +// Filter by integration IDs +func (r ApiListbitbucketRepoIntegrationsRequest) Ids(ids string) ApiListbitbucketRepoIntegrationsRequest { + r.ids = &ids + return r +} + +// Search term to filter integrations by name or description +func (r ApiListbitbucketRepoIntegrationsRequest) Search(search string) ApiListbitbucketRepoIntegrationsRequest { + r.search = &search + return r +} + +func (r ApiListbitbucketRepoIntegrationsRequest) Execute() (*ListakamaiIntegrations200Response, *http.Response, error) { + return r.ApiService.ListbitbucketRepoIntegrationsExecute(r) +} + +/* +ListbitbucketRepoIntegrations List Bitbucket Repo integrations. + +List and search Bitbucket Repo integrations of the organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListbitbucketRepoIntegrationsRequest +*/ +func (a *IntegrationsAPIService) ListbitbucketRepoIntegrations(ctx context.Context) ApiListbitbucketRepoIntegrationsRequest { + return ApiListbitbucketRepoIntegrationsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ListakamaiIntegrations200Response +func (a *IntegrationsAPIService) ListbitbucketRepoIntegrationsExecute(r ApiListbitbucketRepoIntegrationsRequest) (*ListakamaiIntegrations200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListakamaiIntegrations200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.ListbitbucketRepoIntegrations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/bitbucket-repo" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "form", "") + } else { + var defaultValue int = 50 + parameterAddToHeaderOrQuery(localVarQueryParams, "size", defaultValue, "form", "") + r.size = &defaultValue + } + if r.sortType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortType", r.sortType, "form", "") + } + if r.sortDirection != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", r.sortDirection, "form", "") + } else { + var defaultValue string = "asc" + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", defaultValue, "form", "") + r.sortDirection = &defaultValue + } + if r.projectIds != nil { + t := *r.projectIds + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", s.Index(i).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", t, "form", "multi") + } + } + if r.ids != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ids", r.ids, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ListProfiles400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListcloudflareIntegrationsRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + cursor *string + size *int + sortType *string + sortDirection *string + projectIds *[]string + ids *string + search *string +} + +// The cursor to start the pagination from. Returned by the previous page response. If not provided, the first page will be returned. +func (r ApiListcloudflareIntegrationsRequest) Cursor(cursor string) ApiListcloudflareIntegrationsRequest { + r.cursor = &cursor + return r +} + +// The number of items to return per page +func (r ApiListcloudflareIntegrationsRequest) Size(size int) ApiListcloudflareIntegrationsRequest { + r.size = &size + return r +} + +// The type to sort by +func (r ApiListcloudflareIntegrationsRequest) SortType(sortType string) ApiListcloudflareIntegrationsRequest { + r.sortType = &sortType + return r +} + +// The direction to sort by +func (r ApiListcloudflareIntegrationsRequest) SortDirection(sortDirection string) ApiListcloudflareIntegrationsRequest { + r.sortDirection = &sortDirection + return r +} + +// Filter by project IDs +func (r ApiListcloudflareIntegrationsRequest) ProjectIds(projectIds []string) ApiListcloudflareIntegrationsRequest { + r.projectIds = &projectIds + return r +} + +// Filter by integration IDs +func (r ApiListcloudflareIntegrationsRequest) Ids(ids string) ApiListcloudflareIntegrationsRequest { + r.ids = &ids + return r +} + +// Search term to filter integrations by name or description +func (r ApiListcloudflareIntegrationsRequest) Search(search string) ApiListcloudflareIntegrationsRequest { + r.search = &search + return r +} + +func (r ApiListcloudflareIntegrationsRequest) Execute() (*ListakamaiIntegrations200Response, *http.Response, error) { + return r.ApiService.ListcloudflareIntegrationsExecute(r) +} + +/* +ListcloudflareIntegrations List Cloudflare integrations. + +List and search Cloudflare integrations of the organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListcloudflareIntegrationsRequest +*/ +func (a *IntegrationsAPIService) ListcloudflareIntegrations(ctx context.Context) ApiListcloudflareIntegrationsRequest { + return ApiListcloudflareIntegrationsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ListakamaiIntegrations200Response +func (a *IntegrationsAPIService) ListcloudflareIntegrationsExecute(r ApiListcloudflareIntegrationsRequest) (*ListakamaiIntegrations200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListakamaiIntegrations200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.ListcloudflareIntegrations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/cloudflare" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "form", "") + } else { + var defaultValue int = 50 + parameterAddToHeaderOrQuery(localVarQueryParams, "size", defaultValue, "form", "") + r.size = &defaultValue + } + if r.sortType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortType", r.sortType, "form", "") + } + if r.sortDirection != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", r.sortDirection, "form", "") + } else { + var defaultValue string = "asc" + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", defaultValue, "form", "") + r.sortDirection = &defaultValue + } + if r.projectIds != nil { + t := *r.projectIds + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", s.Index(i).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", t, "form", "multi") + } + } + if r.ids != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ids", r.ids, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ListProfiles400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListgcpIntegrationsRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + cursor *string + size *int + sortType *string + sortDirection *string + projectIds *[]string + ids *string + search *string +} + +// The cursor to start the pagination from. Returned by the previous page response. If not provided, the first page will be returned. +func (r ApiListgcpIntegrationsRequest) Cursor(cursor string) ApiListgcpIntegrationsRequest { + r.cursor = &cursor + return r +} + +// The number of items to return per page +func (r ApiListgcpIntegrationsRequest) Size(size int) ApiListgcpIntegrationsRequest { + r.size = &size + return r +} + +// The type to sort by +func (r ApiListgcpIntegrationsRequest) SortType(sortType string) ApiListgcpIntegrationsRequest { + r.sortType = &sortType + return r +} + +// The direction to sort by +func (r ApiListgcpIntegrationsRequest) SortDirection(sortDirection string) ApiListgcpIntegrationsRequest { + r.sortDirection = &sortDirection + return r +} + +// Filter by project IDs +func (r ApiListgcpIntegrationsRequest) ProjectIds(projectIds []string) ApiListgcpIntegrationsRequest { + r.projectIds = &projectIds + return r +} + +// Filter by integration IDs +func (r ApiListgcpIntegrationsRequest) Ids(ids string) ApiListgcpIntegrationsRequest { + r.ids = &ids + return r +} + +// Search term to filter integrations by name or description +func (r ApiListgcpIntegrationsRequest) Search(search string) ApiListgcpIntegrationsRequest { + r.search = &search + return r +} + +func (r ApiListgcpIntegrationsRequest) Execute() (*ListakamaiIntegrations200Response, *http.Response, error) { + return r.ApiService.ListgcpIntegrationsExecute(r) +} + +/* +ListgcpIntegrations List GCP integrations. + +List and search GCP integrations of the organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListgcpIntegrationsRequest +*/ +func (a *IntegrationsAPIService) ListgcpIntegrations(ctx context.Context) ApiListgcpIntegrationsRequest { + return ApiListgcpIntegrationsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ListakamaiIntegrations200Response +func (a *IntegrationsAPIService) ListgcpIntegrationsExecute(r ApiListgcpIntegrationsRequest) (*ListakamaiIntegrations200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListakamaiIntegrations200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.ListgcpIntegrations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/gcp" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "form", "") + } else { + var defaultValue int = 50 + parameterAddToHeaderOrQuery(localVarQueryParams, "size", defaultValue, "form", "") + r.size = &defaultValue + } + if r.sortType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortType", r.sortType, "form", "") + } + if r.sortDirection != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", r.sortDirection, "form", "") + } else { + var defaultValue string = "asc" + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", defaultValue, "form", "") + r.sortDirection = &defaultValue + } + if r.projectIds != nil { + t := *r.projectIds + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", s.Index(i).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", t, "form", "multi") + } + } + if r.ids != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ids", r.ids, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ListProfiles400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListgithubIntegrationsRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + cursor *string + size *int + sortType *string + sortDirection *string + projectIds *[]string + ids *string + search *string +} + +// The cursor to start the pagination from. Returned by the previous page response. If not provided, the first page will be returned. +func (r ApiListgithubIntegrationsRequest) Cursor(cursor string) ApiListgithubIntegrationsRequest { + r.cursor = &cursor + return r +} + +// The number of items to return per page +func (r ApiListgithubIntegrationsRequest) Size(size int) ApiListgithubIntegrationsRequest { + r.size = &size + return r +} + +// The type to sort by +func (r ApiListgithubIntegrationsRequest) SortType(sortType string) ApiListgithubIntegrationsRequest { + r.sortType = &sortType + return r +} + +// The direction to sort by +func (r ApiListgithubIntegrationsRequest) SortDirection(sortDirection string) ApiListgithubIntegrationsRequest { + r.sortDirection = &sortDirection + return r +} + +// Filter by project IDs +func (r ApiListgithubIntegrationsRequest) ProjectIds(projectIds []string) ApiListgithubIntegrationsRequest { + r.projectIds = &projectIds + return r +} + +// Filter by integration IDs +func (r ApiListgithubIntegrationsRequest) Ids(ids string) ApiListgithubIntegrationsRequest { + r.ids = &ids + return r +} + +// Search term to filter integrations by name or description +func (r ApiListgithubIntegrationsRequest) Search(search string) ApiListgithubIntegrationsRequest { + r.search = &search + return r +} + +func (r ApiListgithubIntegrationsRequest) Execute() (*ListakamaiIntegrations200Response, *http.Response, error) { + return r.ApiService.ListgithubIntegrationsExecute(r) +} + +/* +ListgithubIntegrations List GitHub integrations. + +List and search GitHub integrations of the organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListgithubIntegrationsRequest +*/ +func (a *IntegrationsAPIService) ListgithubIntegrations(ctx context.Context) ApiListgithubIntegrationsRequest { + return ApiListgithubIntegrationsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ListakamaiIntegrations200Response +func (a *IntegrationsAPIService) ListgithubIntegrationsExecute(r ApiListgithubIntegrationsRequest) (*ListakamaiIntegrations200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListakamaiIntegrations200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.ListgithubIntegrations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/github" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "form", "") + } else { + var defaultValue int = 50 + parameterAddToHeaderOrQuery(localVarQueryParams, "size", defaultValue, "form", "") + r.size = &defaultValue + } + if r.sortType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortType", r.sortType, "form", "") + } + if r.sortDirection != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", r.sortDirection, "form", "") + } else { + var defaultValue string = "asc" + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", defaultValue, "form", "") + r.sortDirection = &defaultValue + } + if r.projectIds != nil { + t := *r.projectIds + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", s.Index(i).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", t, "form", "multi") + } + } + if r.ids != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ids", r.ids, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ListProfiles400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListgitlabIntegrationsRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + cursor *string + size *int + sortType *string + sortDirection *string + projectIds *[]string + ids *string + search *string +} + +// The cursor to start the pagination from. Returned by the previous page response. If not provided, the first page will be returned. +func (r ApiListgitlabIntegrationsRequest) Cursor(cursor string) ApiListgitlabIntegrationsRequest { + r.cursor = &cursor + return r +} + +// The number of items to return per page +func (r ApiListgitlabIntegrationsRequest) Size(size int) ApiListgitlabIntegrationsRequest { + r.size = &size + return r +} + +// The type to sort by +func (r ApiListgitlabIntegrationsRequest) SortType(sortType string) ApiListgitlabIntegrationsRequest { + r.sortType = &sortType + return r +} + +// The direction to sort by +func (r ApiListgitlabIntegrationsRequest) SortDirection(sortDirection string) ApiListgitlabIntegrationsRequest { + r.sortDirection = &sortDirection + return r +} + +// Filter by project IDs +func (r ApiListgitlabIntegrationsRequest) ProjectIds(projectIds []string) ApiListgitlabIntegrationsRequest { + r.projectIds = &projectIds + return r +} + +// Filter by integration IDs +func (r ApiListgitlabIntegrationsRequest) Ids(ids string) ApiListgitlabIntegrationsRequest { + r.ids = &ids + return r +} + +// Search term to filter integrations by name or description +func (r ApiListgitlabIntegrationsRequest) Search(search string) ApiListgitlabIntegrationsRequest { + r.search = &search + return r +} + +func (r ApiListgitlabIntegrationsRequest) Execute() (*ListakamaiIntegrations200Response, *http.Response, error) { + return r.ApiService.ListgitlabIntegrationsExecute(r) +} + +/* +ListgitlabIntegrations List GitLab integrations. + +List and search GitLab integrations of the organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListgitlabIntegrationsRequest +*/ +func (a *IntegrationsAPIService) ListgitlabIntegrations(ctx context.Context) ApiListgitlabIntegrationsRequest { + return ApiListgitlabIntegrationsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ListakamaiIntegrations200Response +func (a *IntegrationsAPIService) ListgitlabIntegrationsExecute(r ApiListgitlabIntegrationsRequest) (*ListakamaiIntegrations200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListakamaiIntegrations200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.ListgitlabIntegrations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/gitlab" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "form", "") + } else { + var defaultValue int = 50 + parameterAddToHeaderOrQuery(localVarQueryParams, "size", defaultValue, "form", "") + r.size = &defaultValue + } + if r.sortType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortType", r.sortType, "form", "") + } + if r.sortDirection != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", r.sortDirection, "form", "") + } else { + var defaultValue string = "asc" + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", defaultValue, "form", "") + r.sortDirection = &defaultValue + } + if r.projectIds != nil { + t := *r.projectIds + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", s.Index(i).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", t, "form", "multi") + } + } + if r.ids != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ids", r.ids, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ListProfiles400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListjiraIntegrationsRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + cursor *string + size *int + sortType *string + sortDirection *string + projectIds *[]string + ids *string + search *string +} + +// The cursor to start the pagination from. Returned by the previous page response. If not provided, the first page will be returned. +func (r ApiListjiraIntegrationsRequest) Cursor(cursor string) ApiListjiraIntegrationsRequest { + r.cursor = &cursor + return r +} + +// The number of items to return per page +func (r ApiListjiraIntegrationsRequest) Size(size int) ApiListjiraIntegrationsRequest { + r.size = &size + return r +} + +// The type to sort by +func (r ApiListjiraIntegrationsRequest) SortType(sortType string) ApiListjiraIntegrationsRequest { + r.sortType = &sortType + return r +} + +// The direction to sort by +func (r ApiListjiraIntegrationsRequest) SortDirection(sortDirection string) ApiListjiraIntegrationsRequest { + r.sortDirection = &sortDirection + return r +} + +// Filter by project IDs +func (r ApiListjiraIntegrationsRequest) ProjectIds(projectIds []string) ApiListjiraIntegrationsRequest { + r.projectIds = &projectIds + return r +} + +// Filter by integration IDs +func (r ApiListjiraIntegrationsRequest) Ids(ids string) ApiListjiraIntegrationsRequest { + r.ids = &ids + return r +} + +// Search term to filter integrations by name or description +func (r ApiListjiraIntegrationsRequest) Search(search string) ApiListjiraIntegrationsRequest { + r.search = &search + return r +} + +func (r ApiListjiraIntegrationsRequest) Execute() (*ListakamaiIntegrations200Response, *http.Response, error) { + return r.ApiService.ListjiraIntegrationsExecute(r) +} + +/* +ListjiraIntegrations List Jira integrations. + +List and search Jira integrations of the organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListjiraIntegrationsRequest +*/ +func (a *IntegrationsAPIService) ListjiraIntegrations(ctx context.Context) ApiListjiraIntegrationsRequest { + return ApiListjiraIntegrationsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ListakamaiIntegrations200Response +func (a *IntegrationsAPIService) ListjiraIntegrationsExecute(r ApiListjiraIntegrationsRequest) (*ListakamaiIntegrations200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListakamaiIntegrations200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.ListjiraIntegrations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/jira" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "form", "") + } else { + var defaultValue int = 50 + parameterAddToHeaderOrQuery(localVarQueryParams, "size", defaultValue, "form", "") + r.size = &defaultValue + } + if r.sortType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortType", r.sortType, "form", "") + } + if r.sortDirection != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", r.sortDirection, "form", "") + } else { + var defaultValue string = "asc" + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", defaultValue, "form", "") + r.sortDirection = &defaultValue + } + if r.projectIds != nil { + t := *r.projectIds + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", s.Index(i).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", t, "form", "multi") + } + } + if r.ids != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ids", r.ids, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ListProfiles400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListkubernetesIntegrationsRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + cursor *string + size *int + sortType *string + sortDirection *string + projectIds *[]string + ids *string + search *string +} + +// The cursor to start the pagination from. Returned by the previous page response. If not provided, the first page will be returned. +func (r ApiListkubernetesIntegrationsRequest) Cursor(cursor string) ApiListkubernetesIntegrationsRequest { + r.cursor = &cursor + return r +} + +// The number of items to return per page +func (r ApiListkubernetesIntegrationsRequest) Size(size int) ApiListkubernetesIntegrationsRequest { + r.size = &size + return r +} + +// The type to sort by +func (r ApiListkubernetesIntegrationsRequest) SortType(sortType string) ApiListkubernetesIntegrationsRequest { + r.sortType = &sortType + return r +} + +// The direction to sort by +func (r ApiListkubernetesIntegrationsRequest) SortDirection(sortDirection string) ApiListkubernetesIntegrationsRequest { + r.sortDirection = &sortDirection + return r +} + +// Filter by project IDs +func (r ApiListkubernetesIntegrationsRequest) ProjectIds(projectIds []string) ApiListkubernetesIntegrationsRequest { + r.projectIds = &projectIds + return r +} + +// Filter by integration IDs +func (r ApiListkubernetesIntegrationsRequest) Ids(ids string) ApiListkubernetesIntegrationsRequest { + r.ids = &ids + return r +} + +// Search term to filter integrations by name or description +func (r ApiListkubernetesIntegrationsRequest) Search(search string) ApiListkubernetesIntegrationsRequest { + r.search = &search + return r +} + +func (r ApiListkubernetesIntegrationsRequest) Execute() (*ListakamaiIntegrations200Response, *http.Response, error) { + return r.ApiService.ListkubernetesIntegrationsExecute(r) +} + +/* +ListkubernetesIntegrations List Kubernetes integrations. + +List and search Kubernetes integrations of the organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListkubernetesIntegrationsRequest +*/ +func (a *IntegrationsAPIService) ListkubernetesIntegrations(ctx context.Context) ApiListkubernetesIntegrationsRequest { + return ApiListkubernetesIntegrationsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ListakamaiIntegrations200Response +func (a *IntegrationsAPIService) ListkubernetesIntegrationsExecute(r ApiListkubernetesIntegrationsRequest) (*ListakamaiIntegrations200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListakamaiIntegrations200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.ListkubernetesIntegrations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/kubernetes" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "form", "") + } else { + var defaultValue int = 50 + parameterAddToHeaderOrQuery(localVarQueryParams, "size", defaultValue, "form", "") + r.size = &defaultValue + } + if r.sortType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortType", r.sortType, "form", "") + } + if r.sortDirection != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", r.sortDirection, "form", "") + } else { + var defaultValue string = "asc" + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", defaultValue, "form", "") + r.sortDirection = &defaultValue + } + if r.projectIds != nil { + t := *r.projectIds + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", s.Index(i).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", t, "form", "multi") + } + } + if r.ids != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ids", r.ids, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ListProfiles400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListpostmanIntegrationsRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + cursor *string + size *int + sortType *string + sortDirection *string + projectIds *[]string + ids *string + search *string +} + +// The cursor to start the pagination from. Returned by the previous page response. If not provided, the first page will be returned. +func (r ApiListpostmanIntegrationsRequest) Cursor(cursor string) ApiListpostmanIntegrationsRequest { + r.cursor = &cursor + return r +} + +// The number of items to return per page +func (r ApiListpostmanIntegrationsRequest) Size(size int) ApiListpostmanIntegrationsRequest { + r.size = &size + return r +} + +// The type to sort by +func (r ApiListpostmanIntegrationsRequest) SortType(sortType string) ApiListpostmanIntegrationsRequest { + r.sortType = &sortType + return r +} + +// The direction to sort by +func (r ApiListpostmanIntegrationsRequest) SortDirection(sortDirection string) ApiListpostmanIntegrationsRequest { + r.sortDirection = &sortDirection + return r +} + +// Filter by project IDs +func (r ApiListpostmanIntegrationsRequest) ProjectIds(projectIds []string) ApiListpostmanIntegrationsRequest { + r.projectIds = &projectIds + return r +} + +// Filter by integration IDs +func (r ApiListpostmanIntegrationsRequest) Ids(ids string) ApiListpostmanIntegrationsRequest { + r.ids = &ids + return r +} + +// Search term to filter integrations by name or description +func (r ApiListpostmanIntegrationsRequest) Search(search string) ApiListpostmanIntegrationsRequest { + r.search = &search + return r +} + +func (r ApiListpostmanIntegrationsRequest) Execute() (*ListakamaiIntegrations200Response, *http.Response, error) { + return r.ApiService.ListpostmanIntegrationsExecute(r) +} + +/* +ListpostmanIntegrations List Postman integrations. + +List and search Postman integrations of the organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListpostmanIntegrationsRequest +*/ +func (a *IntegrationsAPIService) ListpostmanIntegrations(ctx context.Context) ApiListpostmanIntegrationsRequest { + return ApiListpostmanIntegrationsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ListakamaiIntegrations200Response +func (a *IntegrationsAPIService) ListpostmanIntegrationsExecute(r ApiListpostmanIntegrationsRequest) (*ListakamaiIntegrations200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListakamaiIntegrations200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.ListpostmanIntegrations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/postman" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "form", "") + } else { + var defaultValue int = 50 + parameterAddToHeaderOrQuery(localVarQueryParams, "size", defaultValue, "form", "") + r.size = &defaultValue + } + if r.sortType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortType", r.sortType, "form", "") + } + if r.sortDirection != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", r.sortDirection, "form", "") + } else { + var defaultValue string = "asc" + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", defaultValue, "form", "") + r.sortDirection = &defaultValue + } + if r.projectIds != nil { + t := *r.projectIds + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", s.Index(i).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", t, "form", "multi") + } + } + if r.ids != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ids", r.ids, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ListProfiles400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiListwizIntegrationsRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + cursor *string + size *int + sortType *string + sortDirection *string + projectIds *[]string + ids *string + search *string +} + +// The cursor to start the pagination from. Returned by the previous page response. If not provided, the first page will be returned. +func (r ApiListwizIntegrationsRequest) Cursor(cursor string) ApiListwizIntegrationsRequest { + r.cursor = &cursor + return r +} + +// The number of items to return per page +func (r ApiListwizIntegrationsRequest) Size(size int) ApiListwizIntegrationsRequest { + r.size = &size + return r +} + +// The type to sort by +func (r ApiListwizIntegrationsRequest) SortType(sortType string) ApiListwizIntegrationsRequest { + r.sortType = &sortType + return r +} + +// The direction to sort by +func (r ApiListwizIntegrationsRequest) SortDirection(sortDirection string) ApiListwizIntegrationsRequest { + r.sortDirection = &sortDirection + return r +} + +// Filter by project IDs +func (r ApiListwizIntegrationsRequest) ProjectIds(projectIds []string) ApiListwizIntegrationsRequest { + r.projectIds = &projectIds + return r +} + +// Filter by integration IDs +func (r ApiListwizIntegrationsRequest) Ids(ids string) ApiListwizIntegrationsRequest { + r.ids = &ids + return r +} + +// Search term to filter integrations by name or description +func (r ApiListwizIntegrationsRequest) Search(search string) ApiListwizIntegrationsRequest { + r.search = &search + return r +} + +func (r ApiListwizIntegrationsRequest) Execute() (*ListakamaiIntegrations200Response, *http.Response, error) { + return r.ApiService.ListwizIntegrationsExecute(r) +} + +/* +ListwizIntegrations List Wiz integrations. + +List and search Wiz integrations of the organization. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiListwizIntegrationsRequest +*/ +func (a *IntegrationsAPIService) ListwizIntegrations(ctx context.Context) ApiListwizIntegrationsRequest { + return ApiListwizIntegrationsRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return ListakamaiIntegrations200Response +func (a *IntegrationsAPIService) ListwizIntegrationsExecute(r ApiListwizIntegrationsRequest) (*ListakamaiIntegrations200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *ListakamaiIntegrations200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.ListwizIntegrations") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/wiz" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + if r.cursor != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "cursor", r.cursor, "form", "") + } + if r.size != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "size", r.size, "form", "") + } else { + var defaultValue int = 50 + parameterAddToHeaderOrQuery(localVarQueryParams, "size", defaultValue, "form", "") + r.size = &defaultValue + } + if r.sortType != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortType", r.sortType, "form", "") + } + if r.sortDirection != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", r.sortDirection, "form", "") + } else { + var defaultValue string = "asc" + parameterAddToHeaderOrQuery(localVarQueryParams, "sortDirection", defaultValue, "form", "") + r.sortDirection = &defaultValue + } + if r.projectIds != nil { + t := *r.projectIds + if reflect.TypeOf(t).Kind() == reflect.Slice { + s := reflect.ValueOf(t) + for i := 0; i < s.Len(); i++ { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", s.Index(i).Interface(), "form", "multi") + } + } else { + parameterAddToHeaderOrQuery(localVarQueryParams, "projectIds", t, "form", "multi") + } + } + if r.ids != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "ids", r.ids, "form", "") + } + if r.search != nil { + parameterAddToHeaderOrQuery(localVarQueryParams, "search", r.search, "form", "") + } + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v ListProfiles400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateakamaiIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string + updateakamaiIntegrationRequest *UpdateakamaiIntegrationRequest +} + +func (r ApiUpdateakamaiIntegrationRequest) UpdateakamaiIntegrationRequest(updateakamaiIntegrationRequest UpdateakamaiIntegrationRequest) ApiUpdateakamaiIntegrationRequest { + r.updateakamaiIntegrationRequest = &updateakamaiIntegrationRequest + return r +} + +func (r ApiUpdateakamaiIntegrationRequest) Execute() (*CreateakamaiIntegration200Response, *http.Response, error) { + return r.ApiService.UpdateakamaiIntegrationExecute(r) +} + +/* +UpdateakamaiIntegration Update Akamai integration. + +Update a Akamai integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiUpdateakamaiIntegrationRequest +*/ +func (a *IntegrationsAPIService) UpdateakamaiIntegration(ctx context.Context, id string) ApiUpdateakamaiIntegrationRequest { + return ApiUpdateakamaiIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreateakamaiIntegration200Response +func (a *IntegrationsAPIService) UpdateakamaiIntegrationExecute(r ApiUpdateakamaiIntegrationRequest) (*CreateakamaiIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateakamaiIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.UpdateakamaiIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/akamai/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateakamaiIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateapigeeIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string + updateapigeeIntegrationRequest *UpdateapigeeIntegrationRequest +} + +func (r ApiUpdateapigeeIntegrationRequest) UpdateapigeeIntegrationRequest(updateapigeeIntegrationRequest UpdateapigeeIntegrationRequest) ApiUpdateapigeeIntegrationRequest { + r.updateapigeeIntegrationRequest = &updateapigeeIntegrationRequest + return r +} + +func (r ApiUpdateapigeeIntegrationRequest) Execute() (*CreateapigeeIntegration200Response, *http.Response, error) { + return r.ApiService.UpdateapigeeIntegrationExecute(r) +} + +/* +UpdateapigeeIntegration Update Apigee integration. + +Update a Apigee integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiUpdateapigeeIntegrationRequest +*/ +func (a *IntegrationsAPIService) UpdateapigeeIntegration(ctx context.Context, id string) ApiUpdateapigeeIntegrationRequest { + return ApiUpdateapigeeIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreateapigeeIntegration200Response +func (a *IntegrationsAPIService) UpdateapigeeIntegrationExecute(r ApiUpdateapigeeIntegrationRequest) (*CreateapigeeIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateapigeeIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.UpdateapigeeIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/apigee/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateapigeeIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateawsIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string + updateawsIntegrationRequest *UpdateawsIntegrationRequest +} + +func (r ApiUpdateawsIntegrationRequest) UpdateawsIntegrationRequest(updateawsIntegrationRequest UpdateawsIntegrationRequest) ApiUpdateawsIntegrationRequest { + r.updateawsIntegrationRequest = &updateawsIntegrationRequest + return r +} + +func (r ApiUpdateawsIntegrationRequest) Execute() (*CreateawsIntegration200Response, *http.Response, error) { + return r.ApiService.UpdateawsIntegrationExecute(r) +} + +/* +UpdateawsIntegration Update AWS integration. + +Update a AWS integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiUpdateawsIntegrationRequest +*/ +func (a *IntegrationsAPIService) UpdateawsIntegration(ctx context.Context, id string) ApiUpdateawsIntegrationRequest { + return ApiUpdateawsIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreateawsIntegration200Response +func (a *IntegrationsAPIService) UpdateawsIntegrationExecute(r ApiUpdateawsIntegrationRequest) (*CreateawsIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateawsIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.UpdateawsIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/aws/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateawsIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateazureIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string + updateazureIntegrationRequest *UpdateazureIntegrationRequest +} + +func (r ApiUpdateazureIntegrationRequest) UpdateazureIntegrationRequest(updateazureIntegrationRequest UpdateazureIntegrationRequest) ApiUpdateazureIntegrationRequest { + r.updateazureIntegrationRequest = &updateazureIntegrationRequest + return r +} + +func (r ApiUpdateazureIntegrationRequest) Execute() (*CreateazureIntegration200Response, *http.Response, error) { + return r.ApiService.UpdateazureIntegrationExecute(r) +} + +/* +UpdateazureIntegration Update Azure integration. + +Update a Azure integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiUpdateazureIntegrationRequest +*/ +func (a *IntegrationsAPIService) UpdateazureIntegration(ctx context.Context, id string) ApiUpdateazureIntegrationRequest { + return ApiUpdateazureIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreateazureIntegration200Response +func (a *IntegrationsAPIService) UpdateazureIntegrationExecute(r ApiUpdateazureIntegrationRequest) (*CreateazureIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateazureIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.UpdateazureIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/azure/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateazureIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdatebitbucketRepoIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string + updatebitbucketRepoIntegrationRequest *UpdatebitbucketRepoIntegrationRequest +} + +func (r ApiUpdatebitbucketRepoIntegrationRequest) UpdatebitbucketRepoIntegrationRequest(updatebitbucketRepoIntegrationRequest UpdatebitbucketRepoIntegrationRequest) ApiUpdatebitbucketRepoIntegrationRequest { + r.updatebitbucketRepoIntegrationRequest = &updatebitbucketRepoIntegrationRequest + return r +} + +func (r ApiUpdatebitbucketRepoIntegrationRequest) Execute() (*CreatebitbucketRepoIntegration200Response, *http.Response, error) { + return r.ApiService.UpdatebitbucketRepoIntegrationExecute(r) +} + +/* +UpdatebitbucketRepoIntegration Update Bitbucket Repo integration. + +Update a Bitbucket Repo integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiUpdatebitbucketRepoIntegrationRequest +*/ +func (a *IntegrationsAPIService) UpdatebitbucketRepoIntegration(ctx context.Context, id string) ApiUpdatebitbucketRepoIntegrationRequest { + return ApiUpdatebitbucketRepoIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreatebitbucketRepoIntegration200Response +func (a *IntegrationsAPIService) UpdatebitbucketRepoIntegrationExecute(r ApiUpdatebitbucketRepoIntegrationRequest) (*CreatebitbucketRepoIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatebitbucketRepoIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.UpdatebitbucketRepoIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/bitbucket-repo/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updatebitbucketRepoIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdatecloudflareIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string + updatecloudflareIntegrationRequest *UpdatecloudflareIntegrationRequest +} + +func (r ApiUpdatecloudflareIntegrationRequest) UpdatecloudflareIntegrationRequest(updatecloudflareIntegrationRequest UpdatecloudflareIntegrationRequest) ApiUpdatecloudflareIntegrationRequest { + r.updatecloudflareIntegrationRequest = &updatecloudflareIntegrationRequest + return r +} + +func (r ApiUpdatecloudflareIntegrationRequest) Execute() (*CreatecloudflareIntegration200Response, *http.Response, error) { + return r.ApiService.UpdatecloudflareIntegrationExecute(r) +} + +/* +UpdatecloudflareIntegration Update Cloudflare integration. + +Update a Cloudflare integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiUpdatecloudflareIntegrationRequest +*/ +func (a *IntegrationsAPIService) UpdatecloudflareIntegration(ctx context.Context, id string) ApiUpdatecloudflareIntegrationRequest { + return ApiUpdatecloudflareIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreatecloudflareIntegration200Response +func (a *IntegrationsAPIService) UpdatecloudflareIntegrationExecute(r ApiUpdatecloudflareIntegrationRequest) (*CreatecloudflareIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatecloudflareIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.UpdatecloudflareIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/cloudflare/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updatecloudflareIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdategcpIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string + updateapigeeIntegrationRequest *UpdateapigeeIntegrationRequest +} + +func (r ApiUpdategcpIntegrationRequest) UpdateapigeeIntegrationRequest(updateapigeeIntegrationRequest UpdateapigeeIntegrationRequest) ApiUpdategcpIntegrationRequest { + r.updateapigeeIntegrationRequest = &updateapigeeIntegrationRequest + return r +} + +func (r ApiUpdategcpIntegrationRequest) Execute() (*CreateapigeeIntegration200Response, *http.Response, error) { + return r.ApiService.UpdategcpIntegrationExecute(r) +} + +/* +UpdategcpIntegration Update GCP integration. + +Update a GCP integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiUpdategcpIntegrationRequest +*/ +func (a *IntegrationsAPIService) UpdategcpIntegration(ctx context.Context, id string) ApiUpdategcpIntegrationRequest { + return ApiUpdategcpIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreateapigeeIntegration200Response +func (a *IntegrationsAPIService) UpdategcpIntegrationExecute(r ApiUpdategcpIntegrationRequest) (*CreateapigeeIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreateapigeeIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.UpdategcpIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/gcp/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateapigeeIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdategithubIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string + updatecloudflareIntegrationRequest *UpdatecloudflareIntegrationRequest +} + +func (r ApiUpdategithubIntegrationRequest) UpdatecloudflareIntegrationRequest(updatecloudflareIntegrationRequest UpdatecloudflareIntegrationRequest) ApiUpdategithubIntegrationRequest { + r.updatecloudflareIntegrationRequest = &updatecloudflareIntegrationRequest + return r +} + +func (r ApiUpdategithubIntegrationRequest) Execute() (*CreatecloudflareIntegration200Response, *http.Response, error) { + return r.ApiService.UpdategithubIntegrationExecute(r) +} + +/* +UpdategithubIntegration Update GitHub integration. + +Update a GitHub integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiUpdategithubIntegrationRequest +*/ +func (a *IntegrationsAPIService) UpdategithubIntegration(ctx context.Context, id string) ApiUpdategithubIntegrationRequest { + return ApiUpdategithubIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreatecloudflareIntegration200Response +func (a *IntegrationsAPIService) UpdategithubIntegrationExecute(r ApiUpdategithubIntegrationRequest) (*CreatecloudflareIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatecloudflareIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.UpdategithubIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/github/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updatecloudflareIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdategitlabIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string + updategitlabIntegrationRequest *UpdategitlabIntegrationRequest +} + +func (r ApiUpdategitlabIntegrationRequest) UpdategitlabIntegrationRequest(updategitlabIntegrationRequest UpdategitlabIntegrationRequest) ApiUpdategitlabIntegrationRequest { + r.updategitlabIntegrationRequest = &updategitlabIntegrationRequest + return r +} + +func (r ApiUpdategitlabIntegrationRequest) Execute() (*CreategitlabIntegration200Response, *http.Response, error) { + return r.ApiService.UpdategitlabIntegrationExecute(r) +} + +/* +UpdategitlabIntegration Update GitLab integration. + +Update a GitLab integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiUpdategitlabIntegrationRequest +*/ +func (a *IntegrationsAPIService) UpdategitlabIntegration(ctx context.Context, id string) ApiUpdategitlabIntegrationRequest { + return ApiUpdategitlabIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreategitlabIntegration200Response +func (a *IntegrationsAPIService) UpdategitlabIntegrationExecute(r ApiUpdategitlabIntegrationRequest) (*CreategitlabIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreategitlabIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.UpdategitlabIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/gitlab/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updategitlabIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdatejiraIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string + updatejiraIntegrationRequest *UpdatejiraIntegrationRequest +} + +func (r ApiUpdatejiraIntegrationRequest) UpdatejiraIntegrationRequest(updatejiraIntegrationRequest UpdatejiraIntegrationRequest) ApiUpdatejiraIntegrationRequest { + r.updatejiraIntegrationRequest = &updatejiraIntegrationRequest + return r +} + +func (r ApiUpdatejiraIntegrationRequest) Execute() (*CreatejiraIntegration200Response, *http.Response, error) { + return r.ApiService.UpdatejiraIntegrationExecute(r) +} + +/* +UpdatejiraIntegration Update Jira integration. + +Update a Jira integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiUpdatejiraIntegrationRequest +*/ +func (a *IntegrationsAPIService) UpdatejiraIntegration(ctx context.Context, id string) ApiUpdatejiraIntegrationRequest { + return ApiUpdatejiraIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreatejiraIntegration200Response +func (a *IntegrationsAPIService) UpdatejiraIntegrationExecute(r ApiUpdatejiraIntegrationRequest) (*CreatejiraIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatejiraIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.UpdatejiraIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/jira/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updatejiraIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdatekubernetesIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string + updatekubernetesIntegrationRequest *UpdatekubernetesIntegrationRequest +} + +func (r ApiUpdatekubernetesIntegrationRequest) UpdatekubernetesIntegrationRequest(updatekubernetesIntegrationRequest UpdatekubernetesIntegrationRequest) ApiUpdatekubernetesIntegrationRequest { + r.updatekubernetesIntegrationRequest = &updatekubernetesIntegrationRequest + return r +} + +func (r ApiUpdatekubernetesIntegrationRequest) Execute() (*CreatekubernetesIntegration200Response, *http.Response, error) { + return r.ApiService.UpdatekubernetesIntegrationExecute(r) +} + +/* +UpdatekubernetesIntegration Update Kubernetes integration. + +Update a Kubernetes integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiUpdatekubernetesIntegrationRequest +*/ +func (a *IntegrationsAPIService) UpdatekubernetesIntegration(ctx context.Context, id string) ApiUpdatekubernetesIntegrationRequest { + return ApiUpdatekubernetesIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreatekubernetesIntegration200Response +func (a *IntegrationsAPIService) UpdatekubernetesIntegrationExecute(r ApiUpdatekubernetesIntegrationRequest) (*CreatekubernetesIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatekubernetesIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.UpdatekubernetesIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/kubernetes/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updatekubernetesIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdatepostmanIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string + updatecloudflareIntegrationRequest *UpdatecloudflareIntegrationRequest +} + +func (r ApiUpdatepostmanIntegrationRequest) UpdatecloudflareIntegrationRequest(updatecloudflareIntegrationRequest UpdatecloudflareIntegrationRequest) ApiUpdatepostmanIntegrationRequest { + r.updatecloudflareIntegrationRequest = &updatecloudflareIntegrationRequest + return r +} + +func (r ApiUpdatepostmanIntegrationRequest) Execute() (*CreatecloudflareIntegration200Response, *http.Response, error) { + return r.ApiService.UpdatepostmanIntegrationExecute(r) +} + +/* +UpdatepostmanIntegration Update Postman integration. + +Update a Postman integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiUpdatepostmanIntegrationRequest +*/ +func (a *IntegrationsAPIService) UpdatepostmanIntegration(ctx context.Context, id string) ApiUpdatepostmanIntegrationRequest { + return ApiUpdatepostmanIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreatecloudflareIntegration200Response +func (a *IntegrationsAPIService) UpdatepostmanIntegrationExecute(r ApiUpdatepostmanIntegrationRequest) (*CreatecloudflareIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatecloudflareIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.UpdatepostmanIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/postman/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updatecloudflareIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdatewizIntegrationRequest struct { + ctx context.Context + ApiService *IntegrationsAPIService + id string + updatewizIntegrationRequest *UpdatewizIntegrationRequest +} + +func (r ApiUpdatewizIntegrationRequest) UpdatewizIntegrationRequest(updatewizIntegrationRequest UpdatewizIntegrationRequest) ApiUpdatewizIntegrationRequest { + r.updatewizIntegrationRequest = &updatewizIntegrationRequest + return r +} + +func (r ApiUpdatewizIntegrationRequest) Execute() (*CreatewizIntegration200Response, *http.Response, error) { + return r.ApiService.UpdatewizIntegrationExecute(r) +} + +/* +UpdatewizIntegration Update Wiz integration. + +Update a Wiz integration. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiUpdatewizIntegrationRequest +*/ +func (a *IntegrationsAPIService) UpdatewizIntegration(ctx context.Context, id string) ApiUpdatewizIntegrationRequest { + return ApiUpdatewizIntegrationRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return CreatewizIntegration200Response +func (a *IntegrationsAPIService) UpdatewizIntegrationExecute(r ApiUpdatewizIntegrationRequest) (*CreatewizIntegration200Response, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *CreatewizIntegration200Response + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "IntegrationsAPIService.UpdatewizIntegration") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/integrations/wiz/{id}" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updatewizIntegrationRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/v3/api_profiles.go b/pkg/api/v3/api_profiles.go index 80229c3a..d59269a0 100644 --- a/pkg/api/v3/api_profiles.go +++ b/pkg/api/v3/api_profiles.go @@ -1531,14 +1531,17 @@ func (r ApiUpdateProfileSchemaRequest) UpdateProfileSchemaRequest(updateProfileS return r } -func (r ApiUpdateProfileSchemaRequest) Execute() (*SchemaDetailed, *http.Response, error) { +func (r ApiUpdateProfileSchemaRequest) Execute() (*ProfileDetailed, *http.Response, error) { return r.ApiService.UpdateProfileSchemaExecute(r) } /* UpdateProfileSchema Update profile schema -Update the schema of a profile +Update the schema used to scan this profile. + +The schema ID is the ID of a schema uploaded to the Escape Platform using the [POST /assets/schema](#tag/assets/POST/assets/schema) endpoint. + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). @param profileId The profile ID @@ -1553,13 +1556,13 @@ func (a *ProfilesAPIService) UpdateProfileSchema(ctx context.Context, profileId } // Execute executes the request -// @return SchemaDetailed -func (a *ProfilesAPIService) UpdateProfileSchemaExecute(r ApiUpdateProfileSchemaRequest) (*SchemaDetailed, *http.Response, error) { +// @return ProfileDetailed +func (a *ProfilesAPIService) UpdateProfileSchemaExecute(r ApiUpdateProfileSchemaRequest) (*ProfileDetailed, *http.Response, error) { var ( localVarHTTPMethod = http.MethodPut localVarPostBody interface{} formFiles []formFile - localVarReturnValue *SchemaDetailed + localVarReturnValue *ProfileDetailed ) localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "ProfilesAPIService.UpdateProfileSchema") diff --git a/pkg/api/v3/api_workflows.go b/pkg/api/v3/api_workflows.go new file mode 100644 index 00000000..9d53df84 --- /dev/null +++ b/pkg/api/v3/api_workflows.go @@ -0,0 +1,544 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "bytes" + "context" + "io" + "net/http" + "net/url" + "strings" +) + + +// WorkflowsAPIService WorkflowsAPI service +type WorkflowsAPIService service + +type ApiCreateWorkflowRequest struct { + ctx context.Context + ApiService *WorkflowsAPIService + createWorkflowRequest *CreateWorkflowRequest +} + +func (r ApiCreateWorkflowRequest) CreateWorkflowRequest(createWorkflowRequest CreateWorkflowRequest) ApiCreateWorkflowRequest { + r.createWorkflowRequest = &createWorkflowRequest + return r +} + +func (r ApiCreateWorkflowRequest) Execute() (*WorkflowDetailed, *http.Response, error) { + return r.ApiService.CreateWorkflowExecute(r) +} + +/* +CreateWorkflow Create workflows. + +Create a workflow. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @return ApiCreateWorkflowRequest +*/ +func (a *WorkflowsAPIService) CreateWorkflow(ctx context.Context) ApiCreateWorkflowRequest { + return ApiCreateWorkflowRequest{ + ApiService: a, + ctx: ctx, + } +} + +// Execute executes the request +// @return WorkflowDetailed +func (a *WorkflowsAPIService) CreateWorkflowExecute(r ApiCreateWorkflowRequest) (*WorkflowDetailed, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPost + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WorkflowDetailed + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkflowsAPIService.CreateWorkflow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workflows" + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.createWorkflowRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiDeleteWorkflowRequest struct { + ctx context.Context + ApiService *WorkflowsAPIService + id string +} + +func (r ApiDeleteWorkflowRequest) Execute() (*WorkflowDetailed, *http.Response, error) { + return r.ApiService.DeleteWorkflowExecute(r) +} + +/* +DeleteWorkflow Delete workflow. + +Delete a workflow. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiDeleteWorkflowRequest +*/ +func (a *WorkflowsAPIService) DeleteWorkflow(ctx context.Context, id string) ApiDeleteWorkflowRequest { + return ApiDeleteWorkflowRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return WorkflowDetailed +func (a *WorkflowsAPIService) DeleteWorkflowExecute(r ApiDeleteWorkflowRequest) (*WorkflowDetailed, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodDelete + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WorkflowDetailed + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkflowsAPIService.DeleteWorkflow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workflows" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiGetWorkflowRequest struct { + ctx context.Context + ApiService *WorkflowsAPIService + id string +} + +func (r ApiGetWorkflowRequest) Execute() (*WorkflowDetailed, *http.Response, error) { + return r.ApiService.GetWorkflowExecute(r) +} + +/* +GetWorkflow Get workflow. + +Get a workflow. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiGetWorkflowRequest +*/ +func (a *WorkflowsAPIService) GetWorkflow(ctx context.Context, id string) ApiGetWorkflowRequest { + return ApiGetWorkflowRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return WorkflowDetailed +func (a *WorkflowsAPIService) GetWorkflowExecute(r ApiGetWorkflowRequest) (*WorkflowDetailed, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodGet + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WorkflowDetailed + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkflowsAPIService.GetWorkflow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workflows" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} + +type ApiUpdateWorkflowRequest struct { + ctx context.Context + ApiService *WorkflowsAPIService + id string + updateWorkflowRequest *UpdateWorkflowRequest +} + +func (r ApiUpdateWorkflowRequest) UpdateWorkflowRequest(updateWorkflowRequest UpdateWorkflowRequest) ApiUpdateWorkflowRequest { + r.updateWorkflowRequest = &updateWorkflowRequest + return r +} + +func (r ApiUpdateWorkflowRequest) Execute() (*WorkflowDetailed, *http.Response, error) { + return r.ApiService.UpdateWorkflowExecute(r) +} + +/* +UpdateWorkflow Update workflow. + +Update a workflow. + + @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). + @param id The workflow ID + @return ApiUpdateWorkflowRequest +*/ +func (a *WorkflowsAPIService) UpdateWorkflow(ctx context.Context, id string) ApiUpdateWorkflowRequest { + return ApiUpdateWorkflowRequest{ + ApiService: a, + ctx: ctx, + id: id, + } +} + +// Execute executes the request +// @return WorkflowDetailed +func (a *WorkflowsAPIService) UpdateWorkflowExecute(r ApiUpdateWorkflowRequest) (*WorkflowDetailed, *http.Response, error) { + var ( + localVarHTTPMethod = http.MethodPut + localVarPostBody interface{} + formFiles []formFile + localVarReturnValue *WorkflowDetailed + ) + + localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "WorkflowsAPIService.UpdateWorkflow") + if err != nil { + return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} + } + + localVarPath := localBasePath + "/workflows" + localVarPath = strings.Replace(localVarPath, "{"+"id"+"}", url.PathEscape(parameterValueToString(r.id, "id")), -1) + + localVarHeaderParams := make(map[string]string) + localVarQueryParams := url.Values{} + localVarFormParams := url.Values{} + + // to determine the Content-Type header + localVarHTTPContentTypes := []string{"application/json"} + + // set Content-Type header + localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) + if localVarHTTPContentType != "" { + localVarHeaderParams["Content-Type"] = localVarHTTPContentType + } + + // to determine the Accept header + localVarHTTPHeaderAccepts := []string{"application/json"} + + // set Accept header + localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) + if localVarHTTPHeaderAccept != "" { + localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept + } + // body params + localVarPostBody = r.updateWorkflowRequest + if r.ctx != nil { + // API Key Authentication + if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { + if apiKey, ok := auth["apiKey"]; ok { + var key string + if apiKey.Prefix != "" { + key = apiKey.Prefix + " " + apiKey.Key + } else { + key = apiKey.Key + } + localVarHeaderParams["X-ESCAPE-API-KEY"] = key + } + } + } + req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) + if err != nil { + return localVarReturnValue, nil, err + } + + localVarHTTPResponse, err := a.client.callAPI(req) + if err != nil || localVarHTTPResponse == nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + localVarBody, err := io.ReadAll(localVarHTTPResponse.Body) + localVarHTTPResponse.Body.Close() + localVarHTTPResponse.Body = io.NopCloser(bytes.NewBuffer(localVarBody)) + if err != nil { + return localVarReturnValue, localVarHTTPResponse, err + } + + if localVarHTTPResponse.StatusCode >= 300 { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: localVarHTTPResponse.Status, + } + if localVarHTTPResponse.StatusCode == 400 { + var v UpdateProfile400Response + err = a.client.decode(&v, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr.error = err.Error() + return localVarReturnValue, localVarHTTPResponse, newErr + } + newErr.error = formatErrorMessage(localVarHTTPResponse.Status, &v) + newErr.model = v + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) + if err != nil { + newErr := &GenericOpenAPIError{ + body: localVarBody, + error: err.Error(), + } + return localVarReturnValue, localVarHTTPResponse, newErr + } + + return localVarReturnValue, localVarHTTPResponse, nil +} diff --git a/pkg/api/v3/client.go b/pkg/api/v3/client.go index a84d8189..c5bd8911 100644 --- a/pkg/api/v3/client.go +++ b/pkg/api/v3/client.go @@ -53,12 +53,14 @@ type APIClient struct { AuditAPI *AuditAPIService - BetaAPI *BetaAPIService - CustomRulesAPI *CustomRulesAPIService + DefaultAPI *DefaultAPIService + EventsAPI *EventsAPIService + IntegrationsAPI *IntegrationsAPIService + IssuesAPI *IssuesAPIService LocationsAPI *LocationsAPIService @@ -70,6 +72,8 @@ type APIClient struct { TagsAPI *TagsAPIService UploadAPI *UploadAPIService + + WorkflowsAPI *WorkflowsAPIService } type service struct { @@ -90,15 +94,17 @@ func NewAPIClient(cfg *Configuration) *APIClient { // API Services c.AssetsAPI = (*AssetsAPIService)(&c.common) c.AuditAPI = (*AuditAPIService)(&c.common) - c.BetaAPI = (*BetaAPIService)(&c.common) c.CustomRulesAPI = (*CustomRulesAPIService)(&c.common) + c.DefaultAPI = (*DefaultAPIService)(&c.common) c.EventsAPI = (*EventsAPIService)(&c.common) + c.IntegrationsAPI = (*IntegrationsAPIService)(&c.common) c.IssuesAPI = (*IssuesAPIService)(&c.common) c.LocationsAPI = (*LocationsAPIService)(&c.common) c.ProfilesAPI = (*ProfilesAPIService)(&c.common) c.ScansAPI = (*ScansAPIService)(&c.common) c.TagsAPI = (*TagsAPIService)(&c.common) c.UploadAPI = (*UploadAPIService)(&c.common) + c.WorkflowsAPI = (*WorkflowsAPIService)(&c.common) return c } diff --git a/pkg/api/v3/model_create_asset_akamai_account_request.go b/pkg/api/v3/model_create_asset_akamai_account_request.go index bdd5562e..72315daf 100644 --- a/pkg/api/v3/model_create_asset_akamai_account_request.go +++ b/pkg/api/v3/model_create_asset_akamai_account_request.go @@ -20,6 +20,8 @@ var _ MappedNullable = &CreateAssetAKAMAIACCOUNTRequest{} // CreateAssetAKAMAIACCOUNTRequest struct for CreateAssetAKAMAIACCOUNTRequest type CreateAssetAKAMAIACCOUNTRequest struct { + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` AssetClass ENUMCDN `json:"asset_class"` WizProviderId *string `json:"wiz_provider_id,omitempty"` WizCloudPlatform *string `json:"wiz_cloud_platform,omitempty"` @@ -60,6 +62,38 @@ func NewCreateAssetAKAMAIACCOUNTRequestWithDefaults() *CreateAssetAKAMAIACCOUNTR return &this } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateAssetAKAMAIACCOUNTRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetAKAMAIACCOUNTRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateAssetAKAMAIACCOUNTRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateAssetAKAMAIACCOUNTRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetAssetClass returns the AssetClass field value func (o *CreateAssetAKAMAIACCOUNTRequest) GetAssetClass() ENUMCDN { if o == nil { @@ -366,6 +400,9 @@ func (o CreateAssetAKAMAIACCOUNTRequest) MarshalJSON() ([]byte, error) { func (o CreateAssetAKAMAIACCOUNTRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["asset_class"] = o.AssetClass if !IsNil(o.WizProviderId) { toSerialize["wiz_provider_id"] = o.WizProviderId @@ -434,6 +471,7 @@ func (o *CreateAssetAKAMAIACCOUNTRequest) UnmarshalJSON(data []byte) (err error) additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectIds") delete(additionalProperties, "asset_class") delete(additionalProperties, "wiz_provider_id") delete(additionalProperties, "wiz_cloud_platform") diff --git a/pkg/api/v3/model_create_asset_aws_account_request.go b/pkg/api/v3/model_create_asset_aws_account_request.go index f65a296e..5127a4f5 100644 --- a/pkg/api/v3/model_create_asset_aws_account_request.go +++ b/pkg/api/v3/model_create_asset_aws_account_request.go @@ -20,6 +20,8 @@ var _ MappedNullable = &CreateAssetAWSACCOUNTRequest{} // CreateAssetAWSACCOUNTRequest struct for CreateAssetAWSACCOUNTRequest type CreateAssetAWSACCOUNTRequest struct { + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` AssetClass ENUMCLOUDHOSTING `json:"asset_class"` WizProviderId *string `json:"wiz_provider_id,omitempty"` WizCloudPlatform *string `json:"wiz_cloud_platform,omitempty"` @@ -29,6 +31,7 @@ type CreateAssetAWSACCOUNTRequest struct { ImmutableKey string `json:"immutable_key"` PublicKey string `json:"public_key"` PrivateKey string `json:"private_key"` + ExternalIntegrationRoleArn *string `json:"external_integration_role_arn,omitempty"` AdditionalProperties map[string]interface{} } @@ -56,6 +59,38 @@ func NewCreateAssetAWSACCOUNTRequestWithDefaults() *CreateAssetAWSACCOUNTRequest return &this } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateAssetAWSACCOUNTRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetAWSACCOUNTRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateAssetAWSACCOUNTRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateAssetAWSACCOUNTRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetAssetClass returns the AssetClass field value func (o *CreateAssetAWSACCOUNTRequest) GetAssetClass() ENUMCLOUDHOSTING { if o == nil { @@ -304,6 +339,38 @@ func (o *CreateAssetAWSACCOUNTRequest) SetPrivateKey(v string) { o.PrivateKey = v } +// GetExternalIntegrationRoleArn returns the ExternalIntegrationRoleArn field value if set, zero value otherwise. +func (o *CreateAssetAWSACCOUNTRequest) GetExternalIntegrationRoleArn() string { + if o == nil || IsNil(o.ExternalIntegrationRoleArn) { + var ret string + return ret + } + return *o.ExternalIntegrationRoleArn +} + +// GetExternalIntegrationRoleArnOk returns a tuple with the ExternalIntegrationRoleArn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetAWSACCOUNTRequest) GetExternalIntegrationRoleArnOk() (*string, bool) { + if o == nil || IsNil(o.ExternalIntegrationRoleArn) { + return nil, false + } + return o.ExternalIntegrationRoleArn, true +} + +// HasExternalIntegrationRoleArn returns a boolean if a field has been set. +func (o *CreateAssetAWSACCOUNTRequest) HasExternalIntegrationRoleArn() bool { + if o != nil && !IsNil(o.ExternalIntegrationRoleArn) { + return true + } + + return false +} + +// SetExternalIntegrationRoleArn gets a reference to the given string and assigns it to the ExternalIntegrationRoleArn field. +func (o *CreateAssetAWSACCOUNTRequest) SetExternalIntegrationRoleArn(v string) { + o.ExternalIntegrationRoleArn = &v +} + func (o CreateAssetAWSACCOUNTRequest) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -314,6 +381,9 @@ func (o CreateAssetAWSACCOUNTRequest) MarshalJSON() ([]byte, error) { func (o CreateAssetAWSACCOUNTRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["asset_class"] = o.AssetClass if !IsNil(o.WizProviderId) { toSerialize["wiz_provider_id"] = o.WizProviderId @@ -331,6 +401,9 @@ func (o CreateAssetAWSACCOUNTRequest) ToMap() (map[string]interface{}, error) { toSerialize["immutable_key"] = o.ImmutableKey toSerialize["public_key"] = o.PublicKey toSerialize["private_key"] = o.PrivateKey + if !IsNil(o.ExternalIntegrationRoleArn) { + toSerialize["external_integration_role_arn"] = o.ExternalIntegrationRoleArn + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -378,6 +451,7 @@ func (o *CreateAssetAWSACCOUNTRequest) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectIds") delete(additionalProperties, "asset_class") delete(additionalProperties, "wiz_provider_id") delete(additionalProperties, "wiz_cloud_platform") @@ -387,6 +461,7 @@ func (o *CreateAssetAWSACCOUNTRequest) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "immutable_key") delete(additionalProperties, "public_key") delete(additionalProperties, "private_key") + delete(additionalProperties, "external_integration_role_arn") o.AdditionalProperties = additionalProperties } diff --git a/pkg/api/v3/model_create_asset_azure_tenant_request.go b/pkg/api/v3/model_create_asset_azure_tenant_request.go index 28f757bd..4c613490 100644 --- a/pkg/api/v3/model_create_asset_azure_tenant_request.go +++ b/pkg/api/v3/model_create_asset_azure_tenant_request.go @@ -20,6 +20,8 @@ var _ MappedNullable = &CreateAssetAZURETENANTRequest{} // CreateAssetAZURETENANTRequest struct for CreateAssetAZURETENANTRequest type CreateAssetAZURETENANTRequest struct { + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` AssetClass ENUMCLOUDHOSTING `json:"asset_class"` WizProviderId *string `json:"wiz_provider_id,omitempty"` WizCloudPlatform *string `json:"wiz_cloud_platform,omitempty"` @@ -58,6 +60,38 @@ func NewCreateAssetAZURETENANTRequestWithDefaults() *CreateAssetAZURETENANTReque return &this } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateAssetAZURETENANTRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetAZURETENANTRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateAssetAZURETENANTRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateAssetAZURETENANTRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetAssetClass returns the AssetClass field value func (o *CreateAssetAZURETENANTRequest) GetAssetClass() ENUMCLOUDHOSTING { if o == nil { @@ -340,6 +374,9 @@ func (o CreateAssetAZURETENANTRequest) MarshalJSON() ([]byte, error) { func (o CreateAssetAZURETENANTRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["asset_class"] = o.AssetClass if !IsNil(o.WizProviderId) { toSerialize["wiz_provider_id"] = o.WizProviderId @@ -406,6 +443,7 @@ func (o *CreateAssetAZURETENANTRequest) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectIds") delete(additionalProperties, "asset_class") delete(additionalProperties, "wiz_provider_id") delete(additionalProperties, "wiz_cloud_platform") diff --git a/pkg/api/v3/model_create_asset_cloudflare_account_request.go b/pkg/api/v3/model_create_asset_cloudflare_account_request.go index 78de773f..ee16d5d2 100644 --- a/pkg/api/v3/model_create_asset_cloudflare_account_request.go +++ b/pkg/api/v3/model_create_asset_cloudflare_account_request.go @@ -20,6 +20,8 @@ var _ MappedNullable = &CreateAssetCLOUDFLAREACCOUNTRequest{} // CreateAssetCLOUDFLAREACCOUNTRequest struct for CreateAssetCLOUDFLAREACCOUNTRequest type CreateAssetCLOUDFLAREACCOUNTRequest struct { + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` AssetClass ENUMCDN `json:"asset_class"` WizProviderId *string `json:"wiz_provider_id,omitempty"` WizCloudPlatform *string `json:"wiz_cloud_platform,omitempty"` @@ -54,6 +56,38 @@ func NewCreateAssetCLOUDFLAREACCOUNTRequestWithDefaults() *CreateAssetCLOUDFLARE return &this } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateAssetCLOUDFLAREACCOUNTRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetCLOUDFLAREACCOUNTRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateAssetCLOUDFLAREACCOUNTRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateAssetCLOUDFLAREACCOUNTRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetAssetClass returns the AssetClass field value func (o *CreateAssetCLOUDFLAREACCOUNTRequest) GetAssetClass() ENUMCDN { if o == nil { @@ -288,6 +322,9 @@ func (o CreateAssetCLOUDFLAREACCOUNTRequest) MarshalJSON() ([]byte, error) { func (o CreateAssetCLOUDFLAREACCOUNTRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["asset_class"] = o.AssetClass if !IsNil(o.WizProviderId) { toSerialize["wiz_provider_id"] = o.WizProviderId @@ -350,6 +387,7 @@ func (o *CreateAssetCLOUDFLAREACCOUNTRequest) UnmarshalJSON(data []byte) (err er additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectIds") delete(additionalProperties, "asset_class") delete(additionalProperties, "wiz_provider_id") delete(additionalProperties, "wiz_cloud_platform") diff --git a/pkg/api/v3/model_create_asset_dns_request.go b/pkg/api/v3/model_create_asset_dns_request.go index 15d2f2c0..b47ea1e0 100644 --- a/pkg/api/v3/model_create_asset_dns_request.go +++ b/pkg/api/v3/model_create_asset_dns_request.go @@ -20,6 +20,8 @@ var _ MappedNullable = &CreateAssetDNSRequest{} // CreateAssetDNSRequest struct for CreateAssetDNSRequest type CreateAssetDNSRequest struct { + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` AssetClass ENUMHOST `json:"asset_class"` WizProviderId *string `json:"wiz_provider_id,omitempty"` WizCloudPlatform *string `json:"wiz_cloud_platform,omitempty"` @@ -30,6 +32,7 @@ type CreateAssetDNSRequest struct { OpenPorts []CreateAssetDNSRequestOpenPortsInner `json:"open_ports,omitempty"` PortsInsights []float32 `json:"ports_insights,omitempty"` PathsInsights []CreateAssetDNSRequestPathsInsightsInner `json:"paths_insights,omitempty"` + Private *bool `json:"private,omitempty"` ThirdParty *ENUMPROPERTIESTHIRDPARTY `json:"third_party,omitempty"` DnsRecords []CreateAssetDNSRequestDnsRecordsInner `json:"dns_records,omitempty"` Ips []string `json:"ips,omitempty"` @@ -60,6 +63,38 @@ func NewCreateAssetDNSRequestWithDefaults() *CreateAssetDNSRequest { return &this } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateAssetDNSRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetDNSRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateAssetDNSRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateAssetDNSRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetAssetClass returns the AssetClass field value func (o *CreateAssetDNSRequest) GetAssetClass() ENUMHOST { if o == nil { @@ -356,6 +391,38 @@ func (o *CreateAssetDNSRequest) SetPathsInsights(v []CreateAssetDNSRequestPathsI o.PathsInsights = v } +// GetPrivate returns the Private field value if set, zero value otherwise. +func (o *CreateAssetDNSRequest) GetPrivate() bool { + if o == nil || IsNil(o.Private) { + var ret bool + return ret + } + return *o.Private +} + +// GetPrivateOk returns a tuple with the Private field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetDNSRequest) GetPrivateOk() (*bool, bool) { + if o == nil || IsNil(o.Private) { + return nil, false + } + return o.Private, true +} + +// HasPrivate returns a boolean if a field has been set. +func (o *CreateAssetDNSRequest) HasPrivate() bool { + if o != nil && !IsNil(o.Private) { + return true + } + + return false +} + +// SetPrivate gets a reference to the given bool and assigns it to the Private field. +func (o *CreateAssetDNSRequest) SetPrivate(v bool) { + o.Private = &v +} + // GetThirdParty returns the ThirdParty field value if set, zero value otherwise. func (o *CreateAssetDNSRequest) GetThirdParty() ENUMPROPERTIESTHIRDPARTY { if o == nil || IsNil(o.ThirdParty) { @@ -526,6 +593,9 @@ func (o CreateAssetDNSRequest) MarshalJSON() ([]byte, error) { func (o CreateAssetDNSRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["asset_class"] = o.AssetClass if !IsNil(o.WizProviderId) { toSerialize["wiz_provider_id"] = o.WizProviderId @@ -550,6 +620,9 @@ func (o CreateAssetDNSRequest) ToMap() (map[string]interface{}, error) { if !IsNil(o.PathsInsights) { toSerialize["paths_insights"] = o.PathsInsights } + if !IsNil(o.Private) { + toSerialize["private"] = o.Private + } if !IsNil(o.ThirdParty) { toSerialize["third_party"] = o.ThirdParty } @@ -610,6 +683,7 @@ func (o *CreateAssetDNSRequest) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectIds") delete(additionalProperties, "asset_class") delete(additionalProperties, "wiz_provider_id") delete(additionalProperties, "wiz_cloud_platform") @@ -620,6 +694,7 @@ func (o *CreateAssetDNSRequest) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "open_ports") delete(additionalProperties, "ports_insights") delete(additionalProperties, "paths_insights") + delete(additionalProperties, "private") delete(additionalProperties, "third_party") delete(additionalProperties, "dns_records") delete(additionalProperties, "ips") diff --git a/pkg/api/v3/model_create_asset_gcp_project_request.go b/pkg/api/v3/model_create_asset_gcp_project_request.go index b3dd8b6f..66fe02dd 100644 --- a/pkg/api/v3/model_create_asset_gcp_project_request.go +++ b/pkg/api/v3/model_create_asset_gcp_project_request.go @@ -20,6 +20,8 @@ var _ MappedNullable = &CreateAssetGCPPROJECTRequest{} // CreateAssetGCPPROJECTRequest struct for CreateAssetGCPPROJECTRequest type CreateAssetGCPPROJECTRequest struct { + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` AssetClass ENUMCLOUDHOSTING `json:"asset_class"` WizProviderId *string `json:"wiz_provider_id,omitempty"` WizCloudPlatform *string `json:"wiz_cloud_platform,omitempty"` @@ -72,6 +74,38 @@ func NewCreateAssetGCPPROJECTRequestWithDefaults() *CreateAssetGCPPROJECTRequest return &this } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateAssetGCPPROJECTRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetGCPPROJECTRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateAssetGCPPROJECTRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateAssetGCPPROJECTRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetAssetClass returns the AssetClass field value func (o *CreateAssetGCPPROJECTRequest) GetAssetClass() ENUMCLOUDHOSTING { if o == nil { @@ -522,6 +556,9 @@ func (o CreateAssetGCPPROJECTRequest) MarshalJSON() ([]byte, error) { func (o CreateAssetGCPPROJECTRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["asset_class"] = o.AssetClass if !IsNil(o.WizProviderId) { toSerialize["wiz_provider_id"] = o.WizProviderId @@ -602,6 +639,7 @@ func (o *CreateAssetGCPPROJECTRequest) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectIds") delete(additionalProperties, "asset_class") delete(additionalProperties, "wiz_provider_id") delete(additionalProperties, "wiz_cloud_platform") diff --git a/pkg/api/v3/model_create_asset_github_organization_request.go b/pkg/api/v3/model_create_asset_github_organization_request.go index 78ba4c04..976cf45d 100644 --- a/pkg/api/v3/model_create_asset_github_organization_request.go +++ b/pkg/api/v3/model_create_asset_github_organization_request.go @@ -20,6 +20,8 @@ var _ MappedNullable = &CreateAssetGITHUBORGANIZATIONRequest{} // CreateAssetGITHUBORGANIZATIONRequest struct for CreateAssetGITHUBORGANIZATIONRequest type CreateAssetGITHUBORGANIZATIONRequest struct { + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` AssetClass ENUMSOURCECODEMANAGEMENT `json:"asset_class"` WizProviderId *string `json:"wiz_provider_id,omitempty"` WizCloudPlatform *string `json:"wiz_cloud_platform,omitempty"` @@ -55,6 +57,38 @@ func NewCreateAssetGITHUBORGANIZATIONRequestWithDefaults() *CreateAssetGITHUBORG return &this } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateAssetGITHUBORGANIZATIONRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetGITHUBORGANIZATIONRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateAssetGITHUBORGANIZATIONRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateAssetGITHUBORGANIZATIONRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetAssetClass returns the AssetClass field value func (o *CreateAssetGITHUBORGANIZATIONRequest) GetAssetClass() ENUMSOURCECODEMANAGEMENT { if o == nil { @@ -321,6 +355,9 @@ func (o CreateAssetGITHUBORGANIZATIONRequest) MarshalJSON() ([]byte, error) { func (o CreateAssetGITHUBORGANIZATIONRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["asset_class"] = o.AssetClass if !IsNil(o.WizProviderId) { toSerialize["wiz_provider_id"] = o.WizProviderId @@ -386,6 +423,7 @@ func (o *CreateAssetGITHUBORGANIZATIONRequest) UnmarshalJSON(data []byte) (err e additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectIds") delete(additionalProperties, "asset_class") delete(additionalProperties, "wiz_provider_id") delete(additionalProperties, "wiz_cloud_platform") diff --git a/pkg/api/v3/model_create_asset_github_repository_request.go b/pkg/api/v3/model_create_asset_github_repository_request.go index e5f272c5..9b2a72d1 100644 --- a/pkg/api/v3/model_create_asset_github_repository_request.go +++ b/pkg/api/v3/model_create_asset_github_repository_request.go @@ -20,6 +20,8 @@ var _ MappedNullable = &CreateAssetGITHUBREPOSITORYRequest{} // CreateAssetGITHUBREPOSITORYRequest struct for CreateAssetGITHUBREPOSITORYRequest type CreateAssetGITHUBREPOSITORYRequest struct { + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` AssetClass ENUMREPOSITORY `json:"asset_class"` WizProviderId *string `json:"wiz_provider_id,omitempty"` WizCloudPlatform *string `json:"wiz_cloud_platform,omitempty"` @@ -66,6 +68,38 @@ func NewCreateAssetGITHUBREPOSITORYRequestWithDefaults() *CreateAssetGITHUBREPOS return &this } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateAssetGITHUBREPOSITORYRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetGITHUBREPOSITORYRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateAssetGITHUBREPOSITORYRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateAssetGITHUBREPOSITORYRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetAssetClass returns the AssetClass field value func (o *CreateAssetGITHUBREPOSITORYRequest) GetAssetClass() ENUMREPOSITORY { if o == nil { @@ -724,6 +758,9 @@ func (o CreateAssetGITHUBREPOSITORYRequest) MarshalJSON() ([]byte, error) { func (o CreateAssetGITHUBREPOSITORYRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["asset_class"] = o.AssetClass if !IsNil(o.WizProviderId) { toSerialize["wiz_provider_id"] = o.WizProviderId @@ -826,6 +863,7 @@ func (o *CreateAssetGITHUBREPOSITORYRequest) UnmarshalJSON(data []byte) (err err additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectIds") delete(additionalProperties, "asset_class") delete(additionalProperties, "wiz_provider_id") delete(additionalProperties, "wiz_cloud_platform") diff --git a/pkg/api/v3/model_create_asset_gitlab_group_request.go b/pkg/api/v3/model_create_asset_gitlab_group_request.go index a3ccdf55..2a3c07e1 100644 --- a/pkg/api/v3/model_create_asset_gitlab_group_request.go +++ b/pkg/api/v3/model_create_asset_gitlab_group_request.go @@ -20,6 +20,8 @@ var _ MappedNullable = &CreateAssetGITLABGROUPRequest{} // CreateAssetGITLABGROUPRequest struct for CreateAssetGITLABGROUPRequest type CreateAssetGITLABGROUPRequest struct { + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` AssetClass ENUMSOURCECODEMANAGEMENT `json:"asset_class"` WizProviderId *string `json:"wiz_provider_id,omitempty"` WizCloudPlatform *string `json:"wiz_cloud_platform,omitempty"` @@ -56,6 +58,38 @@ func NewCreateAssetGITLABGROUPRequestWithDefaults() *CreateAssetGITLABGROUPReque return &this } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateAssetGITLABGROUPRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetGITLABGROUPRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateAssetGITLABGROUPRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateAssetGITLABGROUPRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetAssetClass returns the AssetClass field value func (o *CreateAssetGITLABGROUPRequest) GetAssetClass() ENUMSOURCECODEMANAGEMENT { if o == nil { @@ -354,6 +388,9 @@ func (o CreateAssetGITLABGROUPRequest) MarshalJSON() ([]byte, error) { func (o CreateAssetGITLABGROUPRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["asset_class"] = o.AssetClass if !IsNil(o.WizProviderId) { toSerialize["wiz_provider_id"] = o.WizProviderId @@ -422,6 +459,7 @@ func (o *CreateAssetGITLABGROUPRequest) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectIds") delete(additionalProperties, "asset_class") delete(additionalProperties, "wiz_provider_id") delete(additionalProperties, "wiz_cloud_platform") diff --git a/pkg/api/v3/model_create_asset_gitlab_repository_request.go b/pkg/api/v3/model_create_asset_gitlab_repository_request.go index 8d2dda24..92bc01e1 100644 --- a/pkg/api/v3/model_create_asset_gitlab_repository_request.go +++ b/pkg/api/v3/model_create_asset_gitlab_repository_request.go @@ -20,6 +20,8 @@ var _ MappedNullable = &CreateAssetGITLABREPOSITORYRequest{} // CreateAssetGITLABREPOSITORYRequest struct for CreateAssetGITLABREPOSITORYRequest type CreateAssetGITLABREPOSITORYRequest struct { + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` AssetClass ENUMREPOSITORY `json:"asset_class"` WizProviderId *string `json:"wiz_provider_id,omitempty"` WizCloudPlatform *string `json:"wiz_cloud_platform,omitempty"` @@ -64,6 +66,38 @@ func NewCreateAssetGITLABREPOSITORYRequestWithDefaults() *CreateAssetGITLABREPOS return &this } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateAssetGITLABREPOSITORYRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetGITLABREPOSITORYRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateAssetGITLABREPOSITORYRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateAssetGITLABREPOSITORYRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetAssetClass returns the AssetClass field value func (o *CreateAssetGITLABREPOSITORYRequest) GetAssetClass() ENUMREPOSITORY { if o == nil { @@ -658,6 +692,9 @@ func (o CreateAssetGITLABREPOSITORYRequest) MarshalJSON() ([]byte, error) { func (o CreateAssetGITLABREPOSITORYRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["asset_class"] = o.AssetClass if !IsNil(o.WizProviderId) { toSerialize["wiz_provider_id"] = o.WizProviderId @@ -754,6 +791,7 @@ func (o *CreateAssetGITLABREPOSITORYRequest) UnmarshalJSON(data []byte) (err err additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectIds") delete(additionalProperties, "asset_class") delete(additionalProperties, "wiz_provider_id") delete(additionalProperties, "wiz_cloud_platform") diff --git a/pkg/api/v3/model_create_asset_graphql_request.go b/pkg/api/v3/model_create_asset_graphql_request.go index c8118d37..d19d06ac 100644 --- a/pkg/api/v3/model_create_asset_graphql_request.go +++ b/pkg/api/v3/model_create_asset_graphql_request.go @@ -20,6 +20,8 @@ var _ MappedNullable = &CreateAssetGRAPHQLRequest{} // CreateAssetGRAPHQLRequest struct for CreateAssetGRAPHQLRequest type CreateAssetGRAPHQLRequest struct { + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` AssetClass ENUMAPISERVICE `json:"asset_class"` WizProviderId *string `json:"wiz_provider_id,omitempty"` WizCloudPlatform *string `json:"wiz_cloud_platform,omitempty"` @@ -64,6 +66,38 @@ func NewCreateAssetGRAPHQLRequestWithDefaults() *CreateAssetGRAPHQLRequest { return &this } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateAssetGRAPHQLRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetGRAPHQLRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateAssetGRAPHQLRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateAssetGRAPHQLRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetAssetClass returns the AssetClass field value func (o *CreateAssetGRAPHQLRequest) GetAssetClass() ENUMAPISERVICE { if o == nil { @@ -658,6 +692,9 @@ func (o CreateAssetGRAPHQLRequest) MarshalJSON() ([]byte, error) { func (o CreateAssetGRAPHQLRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["asset_class"] = o.AssetClass if !IsNil(o.WizProviderId) { toSerialize["wiz_provider_id"] = o.WizProviderId @@ -754,6 +791,7 @@ func (o *CreateAssetGRAPHQLRequest) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectIds") delete(additionalProperties, "asset_class") delete(additionalProperties, "wiz_provider_id") delete(additionalProperties, "wiz_cloud_platform") diff --git a/pkg/api/v3/model_create_asset_grpc_request.go b/pkg/api/v3/model_create_asset_grpc_request.go index baa2ef59..447ea755 100644 --- a/pkg/api/v3/model_create_asset_grpc_request.go +++ b/pkg/api/v3/model_create_asset_grpc_request.go @@ -20,6 +20,8 @@ var _ MappedNullable = &CreateAssetGRPCRequest{} // CreateAssetGRPCRequest struct for CreateAssetGRPCRequest type CreateAssetGRPCRequest struct { + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` AssetClass ENUMAPISERVICE `json:"asset_class"` WizProviderId *string `json:"wiz_provider_id,omitempty"` WizCloudPlatform *string `json:"wiz_cloud_platform,omitempty"` @@ -62,6 +64,38 @@ func NewCreateAssetGRPCRequestWithDefaults() *CreateAssetGRPCRequest { return &this } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateAssetGRPCRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetGRPCRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateAssetGRPCRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateAssetGRPCRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetAssetClass returns the AssetClass field value func (o *CreateAssetGRPCRequest) GetAssetClass() ENUMAPISERVICE { if o == nil { @@ -592,6 +626,9 @@ func (o CreateAssetGRPCRequest) MarshalJSON() ([]byte, error) { func (o CreateAssetGRPCRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["asset_class"] = o.AssetClass if !IsNil(o.WizProviderId) { toSerialize["wiz_provider_id"] = o.WizProviderId @@ -682,6 +719,7 @@ func (o *CreateAssetGRPCRequest) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectIds") delete(additionalProperties, "asset_class") delete(additionalProperties, "wiz_provider_id") delete(additionalProperties, "wiz_cloud_platform") diff --git a/pkg/api/v3/model_create_asset_ipv4_request.go b/pkg/api/v3/model_create_asset_ipv4_request.go index df9cdd31..d637c1da 100644 --- a/pkg/api/v3/model_create_asset_ipv4_request.go +++ b/pkg/api/v3/model_create_asset_ipv4_request.go @@ -20,6 +20,8 @@ var _ MappedNullable = &CreateAssetIPV4Request{} // CreateAssetIPV4Request struct for CreateAssetIPV4Request type CreateAssetIPV4Request struct { + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` AssetClass ENUMHOST `json:"asset_class"` WizProviderId *string `json:"wiz_provider_id,omitempty"` WizCloudPlatform *string `json:"wiz_cloud_platform,omitempty"` @@ -30,6 +32,7 @@ type CreateAssetIPV4Request struct { OpenPorts []CreateAssetDNSRequestOpenPortsInner `json:"open_ports,omitempty"` PortsInsights []float32 `json:"ports_insights,omitempty"` PathsInsights []CreateAssetDNSRequestPathsInsightsInner `json:"paths_insights,omitempty"` + Private *bool `json:"private,omitempty"` ThirdParty *ENUMPROPERTIESTHIRDPARTY `json:"third_party,omitempty"` Organization *string `json:"organization,omitempty"` Country *string `json:"country,omitempty"` @@ -58,6 +61,38 @@ func NewCreateAssetIPV4RequestWithDefaults() *CreateAssetIPV4Request { return &this } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateAssetIPV4Request) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetIPV4Request) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateAssetIPV4Request) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateAssetIPV4Request) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetAssetClass returns the AssetClass field value func (o *CreateAssetIPV4Request) GetAssetClass() ENUMHOST { if o == nil { @@ -354,6 +389,38 @@ func (o *CreateAssetIPV4Request) SetPathsInsights(v []CreateAssetDNSRequestPaths o.PathsInsights = v } +// GetPrivate returns the Private field value if set, zero value otherwise. +func (o *CreateAssetIPV4Request) GetPrivate() bool { + if o == nil || IsNil(o.Private) { + var ret bool + return ret + } + return *o.Private +} + +// GetPrivateOk returns a tuple with the Private field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetIPV4Request) GetPrivateOk() (*bool, bool) { + if o == nil || IsNil(o.Private) { + return nil, false + } + return o.Private, true +} + +// HasPrivate returns a boolean if a field has been set. +func (o *CreateAssetIPV4Request) HasPrivate() bool { + if o != nil && !IsNil(o.Private) { + return true + } + + return false +} + +// SetPrivate gets a reference to the given bool and assigns it to the Private field. +func (o *CreateAssetIPV4Request) SetPrivate(v bool) { + o.Private = &v +} + // GetThirdParty returns the ThirdParty field value if set, zero value otherwise. func (o *CreateAssetIPV4Request) GetThirdParty() ENUMPROPERTIESTHIRDPARTY { if o == nil || IsNil(o.ThirdParty) { @@ -460,6 +527,9 @@ func (o CreateAssetIPV4Request) MarshalJSON() ([]byte, error) { func (o CreateAssetIPV4Request) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["asset_class"] = o.AssetClass if !IsNil(o.WizProviderId) { toSerialize["wiz_provider_id"] = o.WizProviderId @@ -484,6 +554,9 @@ func (o CreateAssetIPV4Request) ToMap() (map[string]interface{}, error) { if !IsNil(o.PathsInsights) { toSerialize["paths_insights"] = o.PathsInsights } + if !IsNil(o.Private) { + toSerialize["private"] = o.Private + } if !IsNil(o.ThirdParty) { toSerialize["third_party"] = o.ThirdParty } @@ -538,6 +611,7 @@ func (o *CreateAssetIPV4Request) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectIds") delete(additionalProperties, "asset_class") delete(additionalProperties, "wiz_provider_id") delete(additionalProperties, "wiz_cloud_platform") @@ -548,6 +622,7 @@ func (o *CreateAssetIPV4Request) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "open_ports") delete(additionalProperties, "ports_insights") delete(additionalProperties, "paths_insights") + delete(additionalProperties, "private") delete(additionalProperties, "third_party") delete(additionalProperties, "organization") delete(additionalProperties, "country") diff --git a/pkg/api/v3/model_create_asset_ipv6_request.go b/pkg/api/v3/model_create_asset_ipv6_request.go index 51da44f4..287073b5 100644 --- a/pkg/api/v3/model_create_asset_ipv6_request.go +++ b/pkg/api/v3/model_create_asset_ipv6_request.go @@ -20,6 +20,8 @@ var _ MappedNullable = &CreateAssetIPV6Request{} // CreateAssetIPV6Request struct for CreateAssetIPV6Request type CreateAssetIPV6Request struct { + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` AssetClass ENUMHOST `json:"asset_class"` WizProviderId *string `json:"wiz_provider_id,omitempty"` WizCloudPlatform *string `json:"wiz_cloud_platform,omitempty"` @@ -30,6 +32,7 @@ type CreateAssetIPV6Request struct { OpenPorts []CreateAssetDNSRequestOpenPortsInner `json:"open_ports,omitempty"` PortsInsights []float32 `json:"ports_insights,omitempty"` PathsInsights []CreateAssetDNSRequestPathsInsightsInner `json:"paths_insights,omitempty"` + Private *bool `json:"private,omitempty"` ThirdParty *ENUMPROPERTIESTHIRDPARTY `json:"third_party,omitempty"` Organization *string `json:"organization,omitempty"` Country *string `json:"country,omitempty"` @@ -58,6 +61,38 @@ func NewCreateAssetIPV6RequestWithDefaults() *CreateAssetIPV6Request { return &this } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateAssetIPV6Request) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetIPV6Request) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateAssetIPV6Request) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateAssetIPV6Request) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetAssetClass returns the AssetClass field value func (o *CreateAssetIPV6Request) GetAssetClass() ENUMHOST { if o == nil { @@ -354,6 +389,38 @@ func (o *CreateAssetIPV6Request) SetPathsInsights(v []CreateAssetDNSRequestPaths o.PathsInsights = v } +// GetPrivate returns the Private field value if set, zero value otherwise. +func (o *CreateAssetIPV6Request) GetPrivate() bool { + if o == nil || IsNil(o.Private) { + var ret bool + return ret + } + return *o.Private +} + +// GetPrivateOk returns a tuple with the Private field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetIPV6Request) GetPrivateOk() (*bool, bool) { + if o == nil || IsNil(o.Private) { + return nil, false + } + return o.Private, true +} + +// HasPrivate returns a boolean if a field has been set. +func (o *CreateAssetIPV6Request) HasPrivate() bool { + if o != nil && !IsNil(o.Private) { + return true + } + + return false +} + +// SetPrivate gets a reference to the given bool and assigns it to the Private field. +func (o *CreateAssetIPV6Request) SetPrivate(v bool) { + o.Private = &v +} + // GetThirdParty returns the ThirdParty field value if set, zero value otherwise. func (o *CreateAssetIPV6Request) GetThirdParty() ENUMPROPERTIESTHIRDPARTY { if o == nil || IsNil(o.ThirdParty) { @@ -460,6 +527,9 @@ func (o CreateAssetIPV6Request) MarshalJSON() ([]byte, error) { func (o CreateAssetIPV6Request) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["asset_class"] = o.AssetClass if !IsNil(o.WizProviderId) { toSerialize["wiz_provider_id"] = o.WizProviderId @@ -484,6 +554,9 @@ func (o CreateAssetIPV6Request) ToMap() (map[string]interface{}, error) { if !IsNil(o.PathsInsights) { toSerialize["paths_insights"] = o.PathsInsights } + if !IsNil(o.Private) { + toSerialize["private"] = o.Private + } if !IsNil(o.ThirdParty) { toSerialize["third_party"] = o.ThirdParty } @@ -538,6 +611,7 @@ func (o *CreateAssetIPV6Request) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectIds") delete(additionalProperties, "asset_class") delete(additionalProperties, "wiz_provider_id") delete(additionalProperties, "wiz_cloud_platform") @@ -548,6 +622,7 @@ func (o *CreateAssetIPV6Request) UnmarshalJSON(data []byte) (err error) { delete(additionalProperties, "open_ports") delete(additionalProperties, "ports_insights") delete(additionalProperties, "paths_insights") + delete(additionalProperties, "private") delete(additionalProperties, "third_party") delete(additionalProperties, "organization") delete(additionalProperties, "country") diff --git a/pkg/api/v3/model_create_asset_kubernetes_cluster_request.go b/pkg/api/v3/model_create_asset_kubernetes_cluster_request.go index b297273a..ebca7b2b 100644 --- a/pkg/api/v3/model_create_asset_kubernetes_cluster_request.go +++ b/pkg/api/v3/model_create_asset_kubernetes_cluster_request.go @@ -20,13 +20,15 @@ var _ MappedNullable = &CreateAssetKUBERNETESCLUSTERRequest{} // CreateAssetKUBERNETESCLUSTERRequest struct for CreateAssetKUBERNETESCLUSTERRequest type CreateAssetKUBERNETESCLUSTERRequest struct { + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` AssetClass ENUMCLOUDHOSTING `json:"asset_class"` WizProviderId *string `json:"wiz_provider_id,omitempty"` WizCloudPlatform *string `json:"wiz_cloud_platform,omitempty"` ExtraMetadata map[string]interface{} `json:"extra_metadata,omitempty"` AssetType ENUMKUBERNETESCLUSTER `json:"asset_type"` Name *string `json:"name,omitempty"` - PrivateLocationId string `json:"private_location_id"` + PrivateLocationId *string `json:"private_location_id,omitempty"` AdditionalProperties map[string]interface{} } @@ -36,11 +38,10 @@ type _CreateAssetKUBERNETESCLUSTERRequest CreateAssetKUBERNETESCLUSTERRequest // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCreateAssetKUBERNETESCLUSTERRequest(assetClass ENUMCLOUDHOSTING, assetType ENUMKUBERNETESCLUSTER, privateLocationId string) *CreateAssetKUBERNETESCLUSTERRequest { +func NewCreateAssetKUBERNETESCLUSTERRequest(assetClass ENUMCLOUDHOSTING, assetType ENUMKUBERNETESCLUSTER) *CreateAssetKUBERNETESCLUSTERRequest { this := CreateAssetKUBERNETESCLUSTERRequest{} this.AssetClass = assetClass this.AssetType = assetType - this.PrivateLocationId = privateLocationId return &this } @@ -52,6 +53,38 @@ func NewCreateAssetKUBERNETESCLUSTERRequestWithDefaults() *CreateAssetKUBERNETES return &this } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateAssetKUBERNETESCLUSTERRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetKUBERNETESCLUSTERRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateAssetKUBERNETESCLUSTERRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateAssetKUBERNETESCLUSTERRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetAssetClass returns the AssetClass field value func (o *CreateAssetKUBERNETESCLUSTERRequest) GetAssetClass() ENUMCLOUDHOSTING { if o == nil { @@ -228,28 +261,36 @@ func (o *CreateAssetKUBERNETESCLUSTERRequest) SetName(v string) { o.Name = &v } -// GetPrivateLocationId returns the PrivateLocationId field value +// GetPrivateLocationId returns the PrivateLocationId field value if set, zero value otherwise. func (o *CreateAssetKUBERNETESCLUSTERRequest) GetPrivateLocationId() string { - if o == nil { + if o == nil || IsNil(o.PrivateLocationId) { var ret string return ret } - - return o.PrivateLocationId + return *o.PrivateLocationId } -// GetPrivateLocationIdOk returns a tuple with the PrivateLocationId field value +// GetPrivateLocationIdOk returns a tuple with the PrivateLocationId field value if set, nil otherwise // and a boolean to check if the value has been set. func (o *CreateAssetKUBERNETESCLUSTERRequest) GetPrivateLocationIdOk() (*string, bool) { - if o == nil { + if o == nil || IsNil(o.PrivateLocationId) { return nil, false } - return &o.PrivateLocationId, true + return o.PrivateLocationId, true +} + +// HasPrivateLocationId returns a boolean if a field has been set. +func (o *CreateAssetKUBERNETESCLUSTERRequest) HasPrivateLocationId() bool { + if o != nil && !IsNil(o.PrivateLocationId) { + return true + } + + return false } -// SetPrivateLocationId sets field value +// SetPrivateLocationId gets a reference to the given string and assigns it to the PrivateLocationId field. func (o *CreateAssetKUBERNETESCLUSTERRequest) SetPrivateLocationId(v string) { - o.PrivateLocationId = v + o.PrivateLocationId = &v } func (o CreateAssetKUBERNETESCLUSTERRequest) MarshalJSON() ([]byte, error) { @@ -262,6 +303,9 @@ func (o CreateAssetKUBERNETESCLUSTERRequest) MarshalJSON() ([]byte, error) { func (o CreateAssetKUBERNETESCLUSTERRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["asset_class"] = o.AssetClass if !IsNil(o.WizProviderId) { toSerialize["wiz_provider_id"] = o.WizProviderId @@ -276,7 +320,9 @@ func (o CreateAssetKUBERNETESCLUSTERRequest) ToMap() (map[string]interface{}, er if !IsNil(o.Name) { toSerialize["name"] = o.Name } - toSerialize["private_location_id"] = o.PrivateLocationId + if !IsNil(o.PrivateLocationId) { + toSerialize["private_location_id"] = o.PrivateLocationId + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -292,7 +338,6 @@ func (o *CreateAssetKUBERNETESCLUSTERRequest) UnmarshalJSON(data []byte) (err er requiredProperties := []string{ "asset_class", "asset_type", - "private_location_id", } allProperties := make(map[string]interface{}) @@ -322,6 +367,7 @@ func (o *CreateAssetKUBERNETESCLUSTERRequest) UnmarshalJSON(data []byte) (err er additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectIds") delete(additionalProperties, "asset_class") delete(additionalProperties, "wiz_provider_id") delete(additionalProperties, "wiz_cloud_platform") diff --git a/pkg/api/v3/model_create_asset_mcp_request.go b/pkg/api/v3/model_create_asset_mcp_request.go index 4d251c89..59c24bc3 100644 --- a/pkg/api/v3/model_create_asset_mcp_request.go +++ b/pkg/api/v3/model_create_asset_mcp_request.go @@ -20,6 +20,8 @@ var _ MappedNullable = &CreateAssetMCPRequest{} // CreateAssetMCPRequest struct for CreateAssetMCPRequest type CreateAssetMCPRequest struct { + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` AssetClass ENUMAPISERVICE `json:"asset_class"` WizProviderId *string `json:"wiz_provider_id,omitempty"` WizCloudPlatform *string `json:"wiz_cloud_platform,omitempty"` @@ -62,6 +64,38 @@ func NewCreateAssetMCPRequestWithDefaults() *CreateAssetMCPRequest { return &this } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateAssetMCPRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetMCPRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateAssetMCPRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateAssetMCPRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetAssetClass returns the AssetClass field value func (o *CreateAssetMCPRequest) GetAssetClass() ENUMAPISERVICE { if o == nil { @@ -592,6 +626,9 @@ func (o CreateAssetMCPRequest) MarshalJSON() ([]byte, error) { func (o CreateAssetMCPRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["asset_class"] = o.AssetClass if !IsNil(o.WizProviderId) { toSerialize["wiz_provider_id"] = o.WizProviderId @@ -682,6 +719,7 @@ func (o *CreateAssetMCPRequest) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectIds") delete(additionalProperties, "asset_class") delete(additionalProperties, "wiz_provider_id") delete(additionalProperties, "wiz_cloud_platform") diff --git a/pkg/api/v3/model_create_asset_postman_organization_request.go b/pkg/api/v3/model_create_asset_postman_organization_request.go index f07ba24e..c9c16206 100644 --- a/pkg/api/v3/model_create_asset_postman_organization_request.go +++ b/pkg/api/v3/model_create_asset_postman_organization_request.go @@ -20,6 +20,8 @@ var _ MappedNullable = &CreateAssetPOSTMANORGANIZATIONRequest{} // CreateAssetPOSTMANORGANIZATIONRequest struct for CreateAssetPOSTMANORGANIZATIONRequest type CreateAssetPOSTMANORGANIZATIONRequest struct { + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` AssetClass ENUMDEVTOOLS `json:"asset_class"` WizProviderId *string `json:"wiz_provider_id,omitempty"` WizCloudPlatform *string `json:"wiz_cloud_platform,omitempty"` @@ -54,6 +56,38 @@ func NewCreateAssetPOSTMANORGANIZATIONRequestWithDefaults() *CreateAssetPOSTMANO return &this } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateAssetPOSTMANORGANIZATIONRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetPOSTMANORGANIZATIONRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateAssetPOSTMANORGANIZATIONRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateAssetPOSTMANORGANIZATIONRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetAssetClass returns the AssetClass field value func (o *CreateAssetPOSTMANORGANIZATIONRequest) GetAssetClass() ENUMDEVTOOLS { if o == nil { @@ -288,6 +322,9 @@ func (o CreateAssetPOSTMANORGANIZATIONRequest) MarshalJSON() ([]byte, error) { func (o CreateAssetPOSTMANORGANIZATIONRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["asset_class"] = o.AssetClass if !IsNil(o.WizProviderId) { toSerialize["wiz_provider_id"] = o.WizProviderId @@ -350,6 +387,7 @@ func (o *CreateAssetPOSTMANORGANIZATIONRequest) UnmarshalJSON(data []byte) (err additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectIds") delete(additionalProperties, "asset_class") delete(additionalProperties, "wiz_provider_id") delete(additionalProperties, "wiz_cloud_platform") diff --git a/pkg/api/v3/model_create_asset_rest_request.go b/pkg/api/v3/model_create_asset_rest_request.go index 8e4e4f13..9dc1d07b 100644 --- a/pkg/api/v3/model_create_asset_rest_request.go +++ b/pkg/api/v3/model_create_asset_rest_request.go @@ -20,6 +20,8 @@ var _ MappedNullable = &CreateAssetRESTRequest{} // CreateAssetRESTRequest struct for CreateAssetRESTRequest type CreateAssetRESTRequest struct { + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` AssetClass ENUMAPISERVICE `json:"asset_class"` WizProviderId *string `json:"wiz_provider_id,omitempty"` WizCloudPlatform *string `json:"wiz_cloud_platform,omitempty"` @@ -65,6 +67,38 @@ func NewCreateAssetRESTRequestWithDefaults() *CreateAssetRESTRequest { return &this } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateAssetRESTRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetRESTRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateAssetRESTRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateAssetRESTRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetAssetClass returns the AssetClass field value func (o *CreateAssetRESTRequest) GetAssetClass() ENUMAPISERVICE { if o == nil { @@ -691,6 +725,9 @@ func (o CreateAssetRESTRequest) MarshalJSON() ([]byte, error) { func (o CreateAssetRESTRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["asset_class"] = o.AssetClass if !IsNil(o.WizProviderId) { toSerialize["wiz_provider_id"] = o.WizProviderId @@ -790,6 +827,7 @@ func (o *CreateAssetRESTRequest) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectIds") delete(additionalProperties, "asset_class") delete(additionalProperties, "wiz_provider_id") delete(additionalProperties, "wiz_cloud_platform") diff --git a/pkg/api/v3/model_create_asset_webapp_request.go b/pkg/api/v3/model_create_asset_webapp_request.go index 1233e343..03c24b72 100644 --- a/pkg/api/v3/model_create_asset_webapp_request.go +++ b/pkg/api/v3/model_create_asset_webapp_request.go @@ -20,6 +20,8 @@ var _ MappedNullable = &CreateAssetWEBAPPRequest{} // CreateAssetWEBAPPRequest struct for CreateAssetWEBAPPRequest type CreateAssetWEBAPPRequest struct { + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` AssetClass ENUMFRONTEND `json:"asset_class"` WizProviderId *string `json:"wiz_provider_id,omitempty"` WizCloudPlatform *string `json:"wiz_cloud_platform,omitempty"` @@ -63,6 +65,38 @@ func NewCreateAssetWEBAPPRequestWithDefaults() *CreateAssetWEBAPPRequest { return &this } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateAssetWEBAPPRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetWEBAPPRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateAssetWEBAPPRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateAssetWEBAPPRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetAssetClass returns the AssetClass field value func (o *CreateAssetWEBAPPRequest) GetAssetClass() ENUMFRONTEND { if o == nil { @@ -625,6 +659,9 @@ func (o CreateAssetWEBAPPRequest) MarshalJSON() ([]byte, error) { func (o CreateAssetWEBAPPRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["asset_class"] = o.AssetClass if !IsNil(o.WizProviderId) { toSerialize["wiz_provider_id"] = o.WizProviderId @@ -718,6 +755,7 @@ func (o *CreateAssetWEBAPPRequest) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectIds") delete(additionalProperties, "asset_class") delete(additionalProperties, "wiz_provider_id") delete(additionalProperties, "wiz_cloud_platform") diff --git a/pkg/api/v3/model_create_asset_websocket_request.go b/pkg/api/v3/model_create_asset_websocket_request.go index 4a86a1c0..861722c0 100644 --- a/pkg/api/v3/model_create_asset_websocket_request.go +++ b/pkg/api/v3/model_create_asset_websocket_request.go @@ -20,6 +20,8 @@ var _ MappedNullable = &CreateAssetWEBSOCKETRequest{} // CreateAssetWEBSOCKETRequest struct for CreateAssetWEBSOCKETRequest type CreateAssetWEBSOCKETRequest struct { + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` AssetClass ENUMAPISERVICE `json:"asset_class"` WizProviderId *string `json:"wiz_provider_id,omitempty"` WizCloudPlatform *string `json:"wiz_cloud_platform,omitempty"` @@ -62,6 +64,38 @@ func NewCreateAssetWEBSOCKETRequestWithDefaults() *CreateAssetWEBSOCKETRequest { return &this } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateAssetWEBSOCKETRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetWEBSOCKETRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateAssetWEBSOCKETRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateAssetWEBSOCKETRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetAssetClass returns the AssetClass field value func (o *CreateAssetWEBSOCKETRequest) GetAssetClass() ENUMAPISERVICE { if o == nil { @@ -592,6 +626,9 @@ func (o CreateAssetWEBSOCKETRequest) MarshalJSON() ([]byte, error) { func (o CreateAssetWEBSOCKETRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["asset_class"] = o.AssetClass if !IsNil(o.WizProviderId) { toSerialize["wiz_provider_id"] = o.WizProviderId @@ -682,6 +719,7 @@ func (o *CreateAssetWEBSOCKETRequest) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectIds") delete(additionalProperties, "asset_class") delete(additionalProperties, "wiz_provider_id") delete(additionalProperties, "wiz_cloud_platform") diff --git a/pkg/api/v3/model_create_asset_wiz_account_request.go b/pkg/api/v3/model_create_asset_wiz_account_request.go index 2d6cc2bd..ecef0833 100644 --- a/pkg/api/v3/model_create_asset_wiz_account_request.go +++ b/pkg/api/v3/model_create_asset_wiz_account_request.go @@ -20,6 +20,8 @@ var _ MappedNullable = &CreateAssetWIZACCOUNTRequest{} // CreateAssetWIZACCOUNTRequest struct for CreateAssetWIZACCOUNTRequest type CreateAssetWIZACCOUNTRequest struct { + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` AssetClass ENUMCSPM `json:"asset_class"` WizProviderId *string `json:"wiz_provider_id,omitempty"` WizCloudPlatform *string `json:"wiz_cloud_platform,omitempty"` @@ -60,6 +62,38 @@ func NewCreateAssetWIZACCOUNTRequestWithDefaults() *CreateAssetWIZACCOUNTRequest return &this } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateAssetWIZACCOUNTRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateAssetWIZACCOUNTRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateAssetWIZACCOUNTRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateAssetWIZACCOUNTRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetAssetClass returns the AssetClass field value func (o *CreateAssetWIZACCOUNTRequest) GetAssetClass() ENUMCSPM { if o == nil { @@ -366,6 +400,9 @@ func (o CreateAssetWIZACCOUNTRequest) MarshalJSON() ([]byte, error) { func (o CreateAssetWIZACCOUNTRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["asset_class"] = o.AssetClass if !IsNil(o.WizProviderId) { toSerialize["wiz_provider_id"] = o.WizProviderId @@ -434,6 +471,7 @@ func (o *CreateAssetWIZACCOUNTRequest) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectIds") delete(additionalProperties, "asset_class") delete(additionalProperties, "wiz_provider_id") delete(additionalProperties, "wiz_cloud_platform") diff --git a/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner.go b/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner.go index a62fbdac..0e1c2cfc 100644 --- a/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner.go +++ b/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner.go @@ -26,6 +26,7 @@ type CreateCustomRuleRequestContentRuleOneOf1DetectInner struct { CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf5 *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf5 CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf6 *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf6 CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7 *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7 + CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf19 *CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf19 CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf20 *CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf20 CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf21 *CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf21 @@ -87,6 +88,13 @@ func CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7AsCreateCustomRule } } +// CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8AsCreateCustomRuleRequestContentRuleOneOf1DetectInner is a convenience function that returns CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 wrapped in CreateCustomRuleRequestContentRuleOneOf1DetectInner +func CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8AsCreateCustomRuleRequestContentRuleOneOf1DetectInner(v *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) CreateCustomRuleRequestContentRuleOneOf1DetectInner { + return CreateCustomRuleRequestContentRuleOneOf1DetectInner{ + CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8: v, + } +} + // CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf19AsCreateCustomRuleRequestContentRuleOneOf1DetectInner is a convenience function that returns CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf19 wrapped in CreateCustomRuleRequestContentRuleOneOf1DetectInner func CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf19AsCreateCustomRuleRequestContentRuleOneOf1DetectInner(v *CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf19) CreateCustomRuleRequestContentRuleOneOf1DetectInner { return CreateCustomRuleRequestContentRuleOneOf1DetectInner{ @@ -249,6 +257,23 @@ func (dst *CreateCustomRuleRequestContentRuleOneOf1DetectInner) UnmarshalJSON(da dst.CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7 = nil } + // try to unmarshal data into CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 + err = newStrictDecoder(data).Decode(&dst.CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) + if err == nil { + jsonCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8, _ := json.Marshal(dst.CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) + if string(jsonCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) == "{}" { // empty struct + dst.CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 = nil + } else { + if err = validator.Validate(dst.CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8); err != nil { + dst.CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 = nil + } else { + match++ + } + } + } else { + dst.CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 = nil + } + // try to unmarshal data into CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf19 err = newStrictDecoder(data).Decode(&dst.CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf19) if err == nil { @@ -310,6 +335,7 @@ func (dst *CreateCustomRuleRequestContentRuleOneOf1DetectInner) UnmarshalJSON(da dst.CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf5 = nil dst.CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf6 = nil dst.CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7 = nil + dst.CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 = nil dst.CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf19 = nil dst.CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf20 = nil dst.CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf21 = nil @@ -356,6 +382,10 @@ func (src CreateCustomRuleRequestContentRuleOneOf1DetectInner) MarshalJSON() ([] return json.Marshal(&src.CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7) } + if src.CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 != nil { + return json.Marshal(&src.CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) + } + if src.CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf19 != nil { return json.Marshal(&src.CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf19) } @@ -408,6 +438,10 @@ func (obj *CreateCustomRuleRequestContentRuleOneOf1DetectInner) GetActualInstanc return obj.CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7 } + if obj.CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 != nil { + return obj.CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 + } + if obj.CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf19 != nil { return obj.CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf19 } @@ -458,6 +492,10 @@ func (obj CreateCustomRuleRequestContentRuleOneOf1DetectInner) GetActualInstance return *obj.CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7 } + if obj.CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 != nil { + return *obj.CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 + } + if obj.CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf19 != nil { return *obj.CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf19 } diff --git a/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_2.go b/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_2.go index cfe61a83..852826f4 100644 --- a/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_2.go +++ b/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_2.go @@ -20,8 +20,13 @@ var _ MappedNullable = &CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf // CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2 struct for CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2 type CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2 struct { + UseExtraction *bool `json:"use_extraction,omitempty"` + Is *string `json:"is,omitempty"` + IsNot *string `json:"is_not,omitempty"` + In []string `json:"in,omitempty"` Contains *string `json:"contains,omitempty"` - If ENUMPAGETEXT `json:"if"` + Regex *string `json:"regex,omitempty"` + If ENUMDIALOGMESSAGE `json:"if"` AdditionalProperties map[string]interface{} } @@ -31,7 +36,7 @@ type _CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2 CreateCustomRule // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2(if_ ENUMPAGETEXT) *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2 { +func NewCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2(if_ ENUMDIALOGMESSAGE) *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2 { this := CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2{} this.If = if_ return &this @@ -45,6 +50,134 @@ func NewCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2WithDefaults() return &this } +// GetUseExtraction returns the UseExtraction field value if set, zero value otherwise. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) GetUseExtraction() bool { + if o == nil || IsNil(o.UseExtraction) { + var ret bool + return ret + } + return *o.UseExtraction +} + +// GetUseExtractionOk returns a tuple with the UseExtraction field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) GetUseExtractionOk() (*bool, bool) { + if o == nil || IsNil(o.UseExtraction) { + return nil, false + } + return o.UseExtraction, true +} + +// HasUseExtraction returns a boolean if a field has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) HasUseExtraction() bool { + if o != nil && !IsNil(o.UseExtraction) { + return true + } + + return false +} + +// SetUseExtraction gets a reference to the given bool and assigns it to the UseExtraction field. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) SetUseExtraction(v bool) { + o.UseExtraction = &v +} + +// GetIs returns the Is field value if set, zero value otherwise. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) GetIs() string { + if o == nil || IsNil(o.Is) { + var ret string + return ret + } + return *o.Is +} + +// GetIsOk returns a tuple with the Is field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) GetIsOk() (*string, bool) { + if o == nil || IsNil(o.Is) { + return nil, false + } + return o.Is, true +} + +// HasIs returns a boolean if a field has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) HasIs() bool { + if o != nil && !IsNil(o.Is) { + return true + } + + return false +} + +// SetIs gets a reference to the given string and assigns it to the Is field. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) SetIs(v string) { + o.Is = &v +} + +// GetIsNot returns the IsNot field value if set, zero value otherwise. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) GetIsNot() string { + if o == nil || IsNil(o.IsNot) { + var ret string + return ret + } + return *o.IsNot +} + +// GetIsNotOk returns a tuple with the IsNot field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) GetIsNotOk() (*string, bool) { + if o == nil || IsNil(o.IsNot) { + return nil, false + } + return o.IsNot, true +} + +// HasIsNot returns a boolean if a field has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) HasIsNot() bool { + if o != nil && !IsNil(o.IsNot) { + return true + } + + return false +} + +// SetIsNot gets a reference to the given string and assigns it to the IsNot field. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) SetIsNot(v string) { + o.IsNot = &v +} + +// GetIn returns the In field value if set, zero value otherwise. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) GetIn() []string { + if o == nil || IsNil(o.In) { + var ret []string + return ret + } + return o.In +} + +// GetInOk returns a tuple with the In field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) GetInOk() ([]string, bool) { + if o == nil || IsNil(o.In) { + return nil, false + } + return o.In, true +} + +// HasIn returns a boolean if a field has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) HasIn() bool { + if o != nil && !IsNil(o.In) { + return true + } + + return false +} + +// SetIn gets a reference to the given []string and assigns it to the In field. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) SetIn(v []string) { + o.In = v +} + // GetContains returns the Contains field value if set, zero value otherwise. func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) GetContains() string { if o == nil || IsNil(o.Contains) { @@ -77,10 +210,42 @@ func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) SetContains( o.Contains = &v } +// GetRegex returns the Regex field value if set, zero value otherwise. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) GetRegex() string { + if o == nil || IsNil(o.Regex) { + var ret string + return ret + } + return *o.Regex +} + +// GetRegexOk returns a tuple with the Regex field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) GetRegexOk() (*string, bool) { + if o == nil || IsNil(o.Regex) { + return nil, false + } + return o.Regex, true +} + +// HasRegex returns a boolean if a field has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) HasRegex() bool { + if o != nil && !IsNil(o.Regex) { + return true + } + + return false +} + +// SetRegex gets a reference to the given string and assigns it to the Regex field. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) SetRegex(v string) { + o.Regex = &v +} + // GetIf returns the If field value -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) GetIf() ENUMPAGETEXT { +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) GetIf() ENUMDIALOGMESSAGE { if o == nil { - var ret ENUMPAGETEXT + var ret ENUMDIALOGMESSAGE return ret } @@ -89,7 +254,7 @@ func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) GetIf() ENUM // GetIfOk returns a tuple with the If field value // and a boolean to check if the value has been set. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) GetIfOk() (*ENUMPAGETEXT, bool) { +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) GetIfOk() (*ENUMDIALOGMESSAGE, bool) { if o == nil { return nil, false } @@ -97,7 +262,7 @@ func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) GetIfOk() (* } // SetIf sets field value -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) SetIf(v ENUMPAGETEXT) { +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) SetIf(v ENUMDIALOGMESSAGE) { o.If = v } @@ -111,9 +276,24 @@ func (o CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) MarshalJSON() func (o CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !IsNil(o.UseExtraction) { + toSerialize["use_extraction"] = o.UseExtraction + } + if !IsNil(o.Is) { + toSerialize["is"] = o.Is + } + if !IsNil(o.IsNot) { + toSerialize["is_not"] = o.IsNot + } + if !IsNil(o.In) { + toSerialize["in"] = o.In + } if !IsNil(o.Contains) { toSerialize["contains"] = o.Contains } + if !IsNil(o.Regex) { + toSerialize["regex"] = o.Regex + } toSerialize["if"] = o.If for key, value := range o.AdditionalProperties { @@ -158,7 +338,12 @@ func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf2) UnmarshalJSO additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "use_extraction") + delete(additionalProperties, "is") + delete(additionalProperties, "is_not") + delete(additionalProperties, "in") delete(additionalProperties, "contains") + delete(additionalProperties, "regex") delete(additionalProperties, "if") o.AdditionalProperties = additionalProperties } diff --git a/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_3.go b/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_3.go index f085be2f..d6a99646 100644 --- a/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_3.go +++ b/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_3.go @@ -20,12 +20,8 @@ var _ MappedNullable = &CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf // CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3 struct for CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3 type CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3 struct { - Is *float32 `json:"is,omitempty"` - IsNot *float32 `json:"is_not,omitempty"` - In []float32 `json:"in,omitempty"` - Gt *float32 `json:"gt,omitempty"` - Lt *float32 `json:"lt,omitempty"` - If ENUMPAGESTATUSCODE `json:"if"` + Contains *string `json:"contains,omitempty"` + If ENUMPAGETEXT `json:"if"` AdditionalProperties map[string]interface{} } @@ -35,7 +31,7 @@ type _CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3 CreateCustomRule // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3(if_ ENUMPAGESTATUSCODE) *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3 { +func NewCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3(if_ ENUMPAGETEXT) *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3 { this := CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3{} this.If = if_ return &this @@ -49,170 +45,42 @@ func NewCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3WithDefaults() return &this } -// GetIs returns the Is field value if set, zero value otherwise. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) GetIs() float32 { - if o == nil || IsNil(o.Is) { - var ret float32 +// GetContains returns the Contains field value if set, zero value otherwise. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) GetContains() string { + if o == nil || IsNil(o.Contains) { + var ret string return ret } - return *o.Is + return *o.Contains } -// GetIsOk returns a tuple with the Is field value if set, nil otherwise +// GetContainsOk returns a tuple with the Contains field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) GetIsOk() (*float32, bool) { - if o == nil || IsNil(o.Is) { +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) GetContainsOk() (*string, bool) { + if o == nil || IsNil(o.Contains) { return nil, false } - return o.Is, true + return o.Contains, true } -// HasIs returns a boolean if a field has been set. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) HasIs() bool { - if o != nil && !IsNil(o.Is) { +// HasContains returns a boolean if a field has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) HasContains() bool { + if o != nil && !IsNil(o.Contains) { return true } return false } -// SetIs gets a reference to the given float32 and assigns it to the Is field. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) SetIs(v float32) { - o.Is = &v -} - -// GetIsNot returns the IsNot field value if set, zero value otherwise. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) GetIsNot() float32 { - if o == nil || IsNil(o.IsNot) { - var ret float32 - return ret - } - return *o.IsNot -} - -// GetIsNotOk returns a tuple with the IsNot field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) GetIsNotOk() (*float32, bool) { - if o == nil || IsNil(o.IsNot) { - return nil, false - } - return o.IsNot, true -} - -// HasIsNot returns a boolean if a field has been set. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) HasIsNot() bool { - if o != nil && !IsNil(o.IsNot) { - return true - } - - return false -} - -// SetIsNot gets a reference to the given float32 and assigns it to the IsNot field. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) SetIsNot(v float32) { - o.IsNot = &v -} - -// GetIn returns the In field value if set, zero value otherwise. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) GetIn() []float32 { - if o == nil || IsNil(o.In) { - var ret []float32 - return ret - } - return o.In -} - -// GetInOk returns a tuple with the In field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) GetInOk() ([]float32, bool) { - if o == nil || IsNil(o.In) { - return nil, false - } - return o.In, true -} - -// HasIn returns a boolean if a field has been set. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) HasIn() bool { - if o != nil && !IsNil(o.In) { - return true - } - - return false -} - -// SetIn gets a reference to the given []float32 and assigns it to the In field. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) SetIn(v []float32) { - o.In = v -} - -// GetGt returns the Gt field value if set, zero value otherwise. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) GetGt() float32 { - if o == nil || IsNil(o.Gt) { - var ret float32 - return ret - } - return *o.Gt -} - -// GetGtOk returns a tuple with the Gt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) GetGtOk() (*float32, bool) { - if o == nil || IsNil(o.Gt) { - return nil, false - } - return o.Gt, true -} - -// HasGt returns a boolean if a field has been set. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) HasGt() bool { - if o != nil && !IsNil(o.Gt) { - return true - } - - return false -} - -// SetGt gets a reference to the given float32 and assigns it to the Gt field. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) SetGt(v float32) { - o.Gt = &v -} - -// GetLt returns the Lt field value if set, zero value otherwise. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) GetLt() float32 { - if o == nil || IsNil(o.Lt) { - var ret float32 - return ret - } - return *o.Lt -} - -// GetLtOk returns a tuple with the Lt field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) GetLtOk() (*float32, bool) { - if o == nil || IsNil(o.Lt) { - return nil, false - } - return o.Lt, true -} - -// HasLt returns a boolean if a field has been set. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) HasLt() bool { - if o != nil && !IsNil(o.Lt) { - return true - } - - return false -} - -// SetLt gets a reference to the given float32 and assigns it to the Lt field. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) SetLt(v float32) { - o.Lt = &v +// SetContains gets a reference to the given string and assigns it to the Contains field. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) SetContains(v string) { + o.Contains = &v } // GetIf returns the If field value -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) GetIf() ENUMPAGESTATUSCODE { +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) GetIf() ENUMPAGETEXT { if o == nil { - var ret ENUMPAGESTATUSCODE + var ret ENUMPAGETEXT return ret } @@ -221,7 +89,7 @@ func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) GetIf() ENUM // GetIfOk returns a tuple with the If field value // and a boolean to check if the value has been set. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) GetIfOk() (*ENUMPAGESTATUSCODE, bool) { +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) GetIfOk() (*ENUMPAGETEXT, bool) { if o == nil { return nil, false } @@ -229,7 +97,7 @@ func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) GetIfOk() (* } // SetIf sets field value -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) SetIf(v ENUMPAGESTATUSCODE) { +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) SetIf(v ENUMPAGETEXT) { o.If = v } @@ -243,20 +111,8 @@ func (o CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) MarshalJSON() func (o CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Is) { - toSerialize["is"] = o.Is - } - if !IsNil(o.IsNot) { - toSerialize["is_not"] = o.IsNot - } - if !IsNil(o.In) { - toSerialize["in"] = o.In - } - if !IsNil(o.Gt) { - toSerialize["gt"] = o.Gt - } - if !IsNil(o.Lt) { - toSerialize["lt"] = o.Lt + if !IsNil(o.Contains) { + toSerialize["contains"] = o.Contains } toSerialize["if"] = o.If @@ -302,11 +158,7 @@ func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf3) UnmarshalJSO additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "is") - delete(additionalProperties, "is_not") - delete(additionalProperties, "in") - delete(additionalProperties, "gt") - delete(additionalProperties, "lt") + delete(additionalProperties, "contains") delete(additionalProperties, "if") o.AdditionalProperties = additionalProperties } diff --git a/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_4.go b/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_4.go index 612aa54b..fc196f06 100644 --- a/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_4.go +++ b/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_4.go @@ -20,9 +20,12 @@ var _ MappedNullable = &CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf // CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4 struct for CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4 type CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4 struct { - Key *CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name `json:"key,omitempty"` - Value *CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name `json:"value,omitempty"` - If ENUMLOCALSTORAGE `json:"if"` + Is *float32 `json:"is,omitempty"` + IsNot *float32 `json:"is_not,omitempty"` + In []float32 `json:"in,omitempty"` + Gt *float32 `json:"gt,omitempty"` + Lt *float32 `json:"lt,omitempty"` + If ENUMPAGESTATUSCODE `json:"if"` AdditionalProperties map[string]interface{} } @@ -32,7 +35,7 @@ type _CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4 CreateCustomRule // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4(if_ ENUMLOCALSTORAGE) *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4 { +func NewCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4(if_ ENUMPAGESTATUSCODE) *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4 { this := CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4{} this.If = if_ return &this @@ -46,74 +49,170 @@ func NewCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4WithDefaults() return &this } -// GetKey returns the Key field value if set, zero value otherwise. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) GetKey() CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name { - if o == nil || IsNil(o.Key) { - var ret CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name +// GetIs returns the Is field value if set, zero value otherwise. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) GetIs() float32 { + if o == nil || IsNil(o.Is) { + var ret float32 return ret } - return *o.Key + return *o.Is } -// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// GetIsOk returns a tuple with the Is field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) GetKeyOk() (*CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name, bool) { - if o == nil || IsNil(o.Key) { +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) GetIsOk() (*float32, bool) { + if o == nil || IsNil(o.Is) { return nil, false } - return o.Key, true + return o.Is, true } -// HasKey returns a boolean if a field has been set. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) HasKey() bool { - if o != nil && !IsNil(o.Key) { +// HasIs returns a boolean if a field has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) HasIs() bool { + if o != nil && !IsNil(o.Is) { return true } return false } -// SetKey gets a reference to the given CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name and assigns it to the Key field. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) SetKey(v CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name) { - o.Key = &v +// SetIs gets a reference to the given float32 and assigns it to the Is field. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) SetIs(v float32) { + o.Is = &v } -// GetValue returns the Value field value if set, zero value otherwise. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) GetValue() CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name { - if o == nil || IsNil(o.Value) { - var ret CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name +// GetIsNot returns the IsNot field value if set, zero value otherwise. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) GetIsNot() float32 { + if o == nil || IsNil(o.IsNot) { + var ret float32 return ret } - return *o.Value + return *o.IsNot } -// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// GetIsNotOk returns a tuple with the IsNot field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) GetValueOk() (*CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name, bool) { - if o == nil || IsNil(o.Value) { +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) GetIsNotOk() (*float32, bool) { + if o == nil || IsNil(o.IsNot) { return nil, false } - return o.Value, true + return o.IsNot, true } -// HasValue returns a boolean if a field has been set. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) HasValue() bool { - if o != nil && !IsNil(o.Value) { +// HasIsNot returns a boolean if a field has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) HasIsNot() bool { + if o != nil && !IsNil(o.IsNot) { return true } return false } -// SetValue gets a reference to the given CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name and assigns it to the Value field. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) SetValue(v CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name) { - o.Value = &v +// SetIsNot gets a reference to the given float32 and assigns it to the IsNot field. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) SetIsNot(v float32) { + o.IsNot = &v +} + +// GetIn returns the In field value if set, zero value otherwise. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) GetIn() []float32 { + if o == nil || IsNil(o.In) { + var ret []float32 + return ret + } + return o.In +} + +// GetInOk returns a tuple with the In field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) GetInOk() ([]float32, bool) { + if o == nil || IsNil(o.In) { + return nil, false + } + return o.In, true +} + +// HasIn returns a boolean if a field has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) HasIn() bool { + if o != nil && !IsNil(o.In) { + return true + } + + return false +} + +// SetIn gets a reference to the given []float32 and assigns it to the In field. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) SetIn(v []float32) { + o.In = v +} + +// GetGt returns the Gt field value if set, zero value otherwise. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) GetGt() float32 { + if o == nil || IsNil(o.Gt) { + var ret float32 + return ret + } + return *o.Gt +} + +// GetGtOk returns a tuple with the Gt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) GetGtOk() (*float32, bool) { + if o == nil || IsNil(o.Gt) { + return nil, false + } + return o.Gt, true +} + +// HasGt returns a boolean if a field has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) HasGt() bool { + if o != nil && !IsNil(o.Gt) { + return true + } + + return false +} + +// SetGt gets a reference to the given float32 and assigns it to the Gt field. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) SetGt(v float32) { + o.Gt = &v +} + +// GetLt returns the Lt field value if set, zero value otherwise. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) GetLt() float32 { + if o == nil || IsNil(o.Lt) { + var ret float32 + return ret + } + return *o.Lt +} + +// GetLtOk returns a tuple with the Lt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) GetLtOk() (*float32, bool) { + if o == nil || IsNil(o.Lt) { + return nil, false + } + return o.Lt, true +} + +// HasLt returns a boolean if a field has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) HasLt() bool { + if o != nil && !IsNil(o.Lt) { + return true + } + + return false +} + +// SetLt gets a reference to the given float32 and assigns it to the Lt field. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) SetLt(v float32) { + o.Lt = &v } // GetIf returns the If field value -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) GetIf() ENUMLOCALSTORAGE { +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) GetIf() ENUMPAGESTATUSCODE { if o == nil { - var ret ENUMLOCALSTORAGE + var ret ENUMPAGESTATUSCODE return ret } @@ -122,7 +221,7 @@ func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) GetIf() ENUM // GetIfOk returns a tuple with the If field value // and a boolean to check if the value has been set. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) GetIfOk() (*ENUMLOCALSTORAGE, bool) { +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) GetIfOk() (*ENUMPAGESTATUSCODE, bool) { if o == nil { return nil, false } @@ -130,7 +229,7 @@ func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) GetIfOk() (* } // SetIf sets field value -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) SetIf(v ENUMLOCALSTORAGE) { +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) SetIf(v ENUMPAGESTATUSCODE) { o.If = v } @@ -144,11 +243,20 @@ func (o CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) MarshalJSON() func (o CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - if !IsNil(o.Key) { - toSerialize["key"] = o.Key + if !IsNil(o.Is) { + toSerialize["is"] = o.Is + } + if !IsNil(o.IsNot) { + toSerialize["is_not"] = o.IsNot + } + if !IsNil(o.In) { + toSerialize["in"] = o.In + } + if !IsNil(o.Gt) { + toSerialize["gt"] = o.Gt } - if !IsNil(o.Value) { - toSerialize["value"] = o.Value + if !IsNil(o.Lt) { + toSerialize["lt"] = o.Lt } toSerialize["if"] = o.If @@ -194,8 +302,11 @@ func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf4) UnmarshalJSO additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "key") - delete(additionalProperties, "value") + delete(additionalProperties, "is") + delete(additionalProperties, "is_not") + delete(additionalProperties, "in") + delete(additionalProperties, "gt") + delete(additionalProperties, "lt") delete(additionalProperties, "if") o.AdditionalProperties = additionalProperties } diff --git a/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_5.go b/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_5.go index 4ed52a4b..8519d3af 100644 --- a/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_5.go +++ b/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_5.go @@ -22,7 +22,7 @@ var _ MappedNullable = &CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf type CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf5 struct { Key *CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name `json:"key,omitempty"` Value *CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name `json:"value,omitempty"` - If ENUMSESSIONSTORAGE `json:"if"` + If ENUMLOCALSTORAGE `json:"if"` AdditionalProperties map[string]interface{} } @@ -32,7 +32,7 @@ type _CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf5 CreateCustomRule // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf5(if_ ENUMSESSIONSTORAGE) *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf5 { +func NewCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf5(if_ ENUMLOCALSTORAGE) *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf5 { this := CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf5{} this.If = if_ return &this @@ -111,9 +111,9 @@ func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf5) SetValue(v C } // GetIf returns the If field value -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf5) GetIf() ENUMSESSIONSTORAGE { +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf5) GetIf() ENUMLOCALSTORAGE { if o == nil { - var ret ENUMSESSIONSTORAGE + var ret ENUMLOCALSTORAGE return ret } @@ -122,7 +122,7 @@ func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf5) GetIf() ENUM // GetIfOk returns a tuple with the If field value // and a boolean to check if the value has been set. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf5) GetIfOk() (*ENUMSESSIONSTORAGE, bool) { +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf5) GetIfOk() (*ENUMLOCALSTORAGE, bool) { if o == nil { return nil, false } @@ -130,7 +130,7 @@ func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf5) GetIfOk() (* } // SetIf sets field value -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf5) SetIf(v ENUMSESSIONSTORAGE) { +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf5) SetIf(v ENUMLOCALSTORAGE) { o.If = v } diff --git a/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_6.go b/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_6.go index 386b9c0a..2c2f3035 100644 --- a/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_6.go +++ b/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_6.go @@ -22,7 +22,7 @@ var _ MappedNullable = &CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf type CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf6 struct { Key *CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name `json:"key,omitempty"` Value *CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name `json:"value,omitempty"` - If ENUMCOOKIE `json:"if"` + If ENUMSESSIONSTORAGE `json:"if"` AdditionalProperties map[string]interface{} } @@ -32,7 +32,7 @@ type _CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf6 CreateCustomRule // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf6(if_ ENUMCOOKIE) *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf6 { +func NewCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf6(if_ ENUMSESSIONSTORAGE) *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf6 { this := CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf6{} this.If = if_ return &this @@ -111,9 +111,9 @@ func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf6) SetValue(v C } // GetIf returns the If field value -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf6) GetIf() ENUMCOOKIE { +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf6) GetIf() ENUMSESSIONSTORAGE { if o == nil { - var ret ENUMCOOKIE + var ret ENUMSESSIONSTORAGE return ret } @@ -122,7 +122,7 @@ func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf6) GetIf() ENUM // GetIfOk returns a tuple with the If field value // and a boolean to check if the value has been set. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf6) GetIfOk() (*ENUMCOOKIE, bool) { +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf6) GetIfOk() (*ENUMSESSIONSTORAGE, bool) { if o == nil { return nil, false } @@ -130,7 +130,7 @@ func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf6) GetIfOk() (* } // SetIf sets field value -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf6) SetIf(v ENUMCOOKIE) { +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf6) SetIf(v ENUMSESSIONSTORAGE) { o.If = v } diff --git a/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_7.go b/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_7.go index 15ad4196..f5d6c079 100644 --- a/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_7.go +++ b/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_7.go @@ -22,7 +22,7 @@ var _ MappedNullable = &CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf type CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7 struct { Key *CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name `json:"key,omitempty"` Value *CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name `json:"value,omitempty"` - If ENUMHEADER `json:"if"` + If ENUMCOOKIE `json:"if"` AdditionalProperties map[string]interface{} } @@ -32,7 +32,7 @@ type _CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7 CreateCustomRule // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7(if_ ENUMHEADER) *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7 { +func NewCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7(if_ ENUMCOOKIE) *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7 { this := CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7{} this.If = if_ return &this @@ -111,9 +111,9 @@ func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7) SetValue(v C } // GetIf returns the If field value -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7) GetIf() ENUMHEADER { +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7) GetIf() ENUMCOOKIE { if o == nil { - var ret ENUMHEADER + var ret ENUMCOOKIE return ret } @@ -122,7 +122,7 @@ func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7) GetIf() ENUM // GetIfOk returns a tuple with the If field value // and a boolean to check if the value has been set. -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7) GetIfOk() (*ENUMHEADER, bool) { +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7) GetIfOk() (*ENUMCOOKIE, bool) { if o == nil { return nil, false } @@ -130,7 +130,7 @@ func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7) GetIfOk() (* } // SetIf sets field value -func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7) SetIf(v ENUMHEADER) { +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf7) SetIf(v ENUMCOOKIE) { o.If = v } diff --git a/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_8.go b/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_8.go new file mode 100644 index 00000000..5b3c7f3e --- /dev/null +++ b/pkg/api/v3/model_create_custom_rule_request_content_rule_one_of_1_detect_inner_one_of_8.go @@ -0,0 +1,242 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8{} + +// CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 struct for CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 +type CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 struct { + Key *CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name `json:"key,omitempty"` + Value *CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name `json:"value,omitempty"` + If ENUMHEADER `json:"if"` + AdditionalProperties map[string]interface{} +} + +type _CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 + +// NewCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 instantiates a new CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8(if_ ENUMHEADER) *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 { + this := CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8{} + this.If = if_ + return &this +} + +// NewCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8WithDefaults instantiates a new CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8WithDefaults() *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 { + this := CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8{} + return &this +} + +// GetKey returns the Key field value if set, zero value otherwise. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) GetKey() CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name { + if o == nil || IsNil(o.Key) { + var ret CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name + return ret + } + return *o.Key +} + +// GetKeyOk returns a tuple with the Key field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) GetKeyOk() (*CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name, bool) { + if o == nil || IsNil(o.Key) { + return nil, false + } + return o.Key, true +} + +// HasKey returns a boolean if a field has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) HasKey() bool { + if o != nil && !IsNil(o.Key) { + return true + } + + return false +} + +// SetKey gets a reference to the given CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name and assigns it to the Key field. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) SetKey(v CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name) { + o.Key = &v +} + +// GetValue returns the Value field value if set, zero value otherwise. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) GetValue() CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name { + if o == nil || IsNil(o.Value) { + var ret CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name + return ret + } + return *o.Value +} + +// GetValueOk returns a tuple with the Value field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) GetValueOk() (*CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name, bool) { + if o == nil || IsNil(o.Value) { + return nil, false + } + return o.Value, true +} + +// HasValue returns a boolean if a field has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) HasValue() bool { + if o != nil && !IsNil(o.Value) { + return true + } + + return false +} + +// SetValue gets a reference to the given CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name and assigns it to the Value field. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) SetValue(v CreateCustomRuleRequestContentRuleOneOfTransformTriggerInnerOneOf7Name) { + o.Value = &v +} + +// GetIf returns the If field value +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) GetIf() ENUMHEADER { + if o == nil { + var ret ENUMHEADER + return ret + } + + return o.If +} + +// GetIfOk returns a tuple with the If field value +// and a boolean to check if the value has been set. +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) GetIfOk() (*ENUMHEADER, bool) { + if o == nil { + return nil, false + } + return &o.If, true +} + +// SetIf sets field value +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) SetIf(v ENUMHEADER) { + o.If = v +} + +func (o CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Key) { + toSerialize["key"] = o.Key + } + if !IsNil(o.Value) { + toSerialize["value"] = o.Value + } + toSerialize["if"] = o.If + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "if", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 := _CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8{} + + err = json.Unmarshal(data, &varCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) + + if err != nil { + return err + } + + *o = CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8(varCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "key") + delete(additionalProperties, "value") + delete(additionalProperties, "if") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 struct { + value *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 + isSet bool +} + +func (v NullableCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) Get() *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 { + return v.value +} + +func (v *NullableCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) Set(val *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) { + v.value = val + v.isSet = true +} + +func (v NullableCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8(val *CreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) *NullableCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8 { + return &NullableCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8{value: val, isSet: true} +} + +func (v NullableCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateCustomRuleRequestContentRuleOneOf1DetectInnerOneOf8) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira.go b/pkg/api/v3/model_create_export_workflow_action_using_jira.go new file mode 100644 index 00000000..3be17e89 --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira.go @@ -0,0 +1,255 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJira type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJira{} + +// CreateExportWorkflowActionUsingJira struct for CreateExportWorkflowActionUsingJira +type CreateExportWorkflowActionUsingJira struct { + Type ENUMEXPORT `json:"type"` + Parameters CreateExportWorkflowActionUsingJiraParameters `json:"parameters"` + IntegrationKind ENUMJIRA `json:"integrationKind"` + IntegrationId string `json:"integrationId"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJira CreateExportWorkflowActionUsingJira + +// NewCreateExportWorkflowActionUsingJira instantiates a new CreateExportWorkflowActionUsingJira object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJira(type_ ENUMEXPORT, parameters CreateExportWorkflowActionUsingJiraParameters, integrationKind ENUMJIRA, integrationId string) *CreateExportWorkflowActionUsingJira { + this := CreateExportWorkflowActionUsingJira{} + this.Type = type_ + this.Parameters = parameters + this.IntegrationKind = integrationKind + this.IntegrationId = integrationId + return &this +} + +// NewCreateExportWorkflowActionUsingJiraWithDefaults instantiates a new CreateExportWorkflowActionUsingJira object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraWithDefaults() *CreateExportWorkflowActionUsingJira { + this := CreateExportWorkflowActionUsingJira{} + return &this +} + +// GetType returns the Type field value +func (o *CreateExportWorkflowActionUsingJira) GetType() ENUMEXPORT { + if o == nil { + var ret ENUMEXPORT + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJira) GetTypeOk() (*ENUMEXPORT, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *CreateExportWorkflowActionUsingJira) SetType(v ENUMEXPORT) { + o.Type = v +} + +// GetParameters returns the Parameters field value +func (o *CreateExportWorkflowActionUsingJira) GetParameters() CreateExportWorkflowActionUsingJiraParameters { + if o == nil { + var ret CreateExportWorkflowActionUsingJiraParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJira) GetParametersOk() (*CreateExportWorkflowActionUsingJiraParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreateExportWorkflowActionUsingJira) SetParameters(v CreateExportWorkflowActionUsingJiraParameters) { + o.Parameters = v +} + +// GetIntegrationKind returns the IntegrationKind field value +func (o *CreateExportWorkflowActionUsingJira) GetIntegrationKind() ENUMJIRA { + if o == nil { + var ret ENUMJIRA + return ret + } + + return o.IntegrationKind +} + +// GetIntegrationKindOk returns a tuple with the IntegrationKind field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJira) GetIntegrationKindOk() (*ENUMJIRA, bool) { + if o == nil { + return nil, false + } + return &o.IntegrationKind, true +} + +// SetIntegrationKind sets field value +func (o *CreateExportWorkflowActionUsingJira) SetIntegrationKind(v ENUMJIRA) { + o.IntegrationKind = v +} + +// GetIntegrationId returns the IntegrationId field value +func (o *CreateExportWorkflowActionUsingJira) GetIntegrationId() string { + if o == nil { + var ret string + return ret + } + + return o.IntegrationId +} + +// GetIntegrationIdOk returns a tuple with the IntegrationId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJira) GetIntegrationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.IntegrationId, true +} + +// SetIntegrationId sets field value +func (o *CreateExportWorkflowActionUsingJira) SetIntegrationId(v string) { + o.IntegrationId = v +} + +func (o CreateExportWorkflowActionUsingJira) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJira) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["parameters"] = o.Parameters + toSerialize["integrationKind"] = o.IntegrationKind + toSerialize["integrationId"] = o.IntegrationId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJira) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "parameters", + "integrationKind", + "integrationId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJira := _CreateExportWorkflowActionUsingJira{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJira) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJira(varCreateExportWorkflowActionUsingJira) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "parameters") + delete(additionalProperties, "integrationKind") + delete(additionalProperties, "integrationId") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJira struct { + value *CreateExportWorkflowActionUsingJira + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJira) Get() *CreateExportWorkflowActionUsingJira { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJira) Set(val *CreateExportWorkflowActionUsingJira) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJira) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJira) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJira(val *CreateExportWorkflowActionUsingJira) *NullableCreateExportWorkflowActionUsingJira { + return &NullableCreateExportWorkflowActionUsingJira{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJira) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJira) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters.go new file mode 100644 index 00000000..f0a4fd96 --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters.go @@ -0,0 +1,263 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParameters{} + +// CreateExportWorkflowActionUsingJiraParameters struct for CreateExportWorkflowActionUsingJiraParameters +type CreateExportWorkflowActionUsingJiraParameters struct { + ProjectId string `json:"projectId"` + IssueType string `json:"issueType"` + PropertiesMapping []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner `json:"propertiesMapping"` + ParentKey *string `json:"parentKey,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParameters CreateExportWorkflowActionUsingJiraParameters + +// NewCreateExportWorkflowActionUsingJiraParameters instantiates a new CreateExportWorkflowActionUsingJiraParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParameters(projectId string, issueType string, propertiesMapping []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner) *CreateExportWorkflowActionUsingJiraParameters { + this := CreateExportWorkflowActionUsingJiraParameters{} + this.ProjectId = projectId + this.IssueType = issueType + this.PropertiesMapping = propertiesMapping + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersWithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersWithDefaults() *CreateExportWorkflowActionUsingJiraParameters { + this := CreateExportWorkflowActionUsingJiraParameters{} + return &this +} + +// GetProjectId returns the ProjectId field value +func (o *CreateExportWorkflowActionUsingJiraParameters) GetProjectId() string { + if o == nil { + var ret string + return ret + } + + return o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParameters) GetProjectIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProjectId, true +} + +// SetProjectId sets field value +func (o *CreateExportWorkflowActionUsingJiraParameters) SetProjectId(v string) { + o.ProjectId = v +} + +// GetIssueType returns the IssueType field value +func (o *CreateExportWorkflowActionUsingJiraParameters) GetIssueType() string { + if o == nil { + var ret string + return ret + } + + return o.IssueType +} + +// GetIssueTypeOk returns a tuple with the IssueType field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParameters) GetIssueTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.IssueType, true +} + +// SetIssueType sets field value +func (o *CreateExportWorkflowActionUsingJiraParameters) SetIssueType(v string) { + o.IssueType = v +} + +// GetPropertiesMapping returns the PropertiesMapping field value +func (o *CreateExportWorkflowActionUsingJiraParameters) GetPropertiesMapping() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner + return ret + } + + return o.PropertiesMapping +} + +// GetPropertiesMappingOk returns a tuple with the PropertiesMapping field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParameters) GetPropertiesMappingOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner, bool) { + if o == nil { + return nil, false + } + return o.PropertiesMapping, true +} + +// SetPropertiesMapping sets field value +func (o *CreateExportWorkflowActionUsingJiraParameters) SetPropertiesMapping(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner) { + o.PropertiesMapping = v +} + +// GetParentKey returns the ParentKey field value if set, zero value otherwise. +func (o *CreateExportWorkflowActionUsingJiraParameters) GetParentKey() string { + if o == nil || IsNil(o.ParentKey) { + var ret string + return ret + } + return *o.ParentKey +} + +// GetParentKeyOk returns a tuple with the ParentKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParameters) GetParentKeyOk() (*string, bool) { + if o == nil || IsNil(o.ParentKey) { + return nil, false + } + return o.ParentKey, true +} + +// HasParentKey returns a boolean if a field has been set. +func (o *CreateExportWorkflowActionUsingJiraParameters) HasParentKey() bool { + if o != nil && !IsNil(o.ParentKey) { + return true + } + + return false +} + +// SetParentKey gets a reference to the given string and assigns it to the ParentKey field. +func (o *CreateExportWorkflowActionUsingJiraParameters) SetParentKey(v string) { + o.ParentKey = &v +} + +func (o CreateExportWorkflowActionUsingJiraParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["projectId"] = o.ProjectId + toSerialize["issueType"] = o.IssueType + toSerialize["propertiesMapping"] = o.PropertiesMapping + if !IsNil(o.ParentKey) { + toSerialize["parentKey"] = o.ParentKey + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParameters) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "projectId", + "issueType", + "propertiesMapping", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParameters := _CreateExportWorkflowActionUsingJiraParameters{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParameters) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParameters(varCreateExportWorkflowActionUsingJiraParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "projectId") + delete(additionalProperties, "issueType") + delete(additionalProperties, "propertiesMapping") + delete(additionalProperties, "parentKey") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParameters struct { + value *CreateExportWorkflowActionUsingJiraParameters + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParameters) Get() *CreateExportWorkflowActionUsingJiraParameters { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParameters) Set(val *CreateExportWorkflowActionUsingJiraParameters) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParameters(val *CreateExportWorkflowActionUsingJiraParameters) *NullableCreateExportWorkflowActionUsingJiraParameters { + return &NullableCreateExportWorkflowActionUsingJiraParameters{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner.go new file mode 100644 index 00000000..29832746 --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner.go @@ -0,0 +1,931 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner - struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner struct { + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 +} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfAsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner is a convenience function that returns CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf wrapped in CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +func CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfAsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(v *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{ + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf: v, + } +} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner is a convenience function that returns CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 wrapped in CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +func CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(v *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{ + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1: v, + } +} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner is a convenience function that returns CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 wrapped in CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +func CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(v *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{ + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10: v, + } +} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner is a convenience function that returns CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 wrapped in CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +func CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(v *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{ + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11: v, + } +} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner is a convenience function that returns CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 wrapped in CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +func CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(v *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{ + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12: v, + } +} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner is a convenience function that returns CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 wrapped in CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +func CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(v *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{ + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13: v, + } +} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner is a convenience function that returns CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 wrapped in CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +func CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(v *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{ + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14: v, + } +} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner is a convenience function that returns CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 wrapped in CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +func CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(v *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{ + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15: v, + } +} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner is a convenience function that returns CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 wrapped in CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +func CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(v *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{ + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16: v, + } +} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner is a convenience function that returns CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 wrapped in CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +func CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(v *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{ + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17: v, + } +} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner is a convenience function that returns CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 wrapped in CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +func CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(v *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{ + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18: v, + } +} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner is a convenience function that returns CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 wrapped in CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +func CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(v *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{ + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19: v, + } +} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner is a convenience function that returns CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 wrapped in CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +func CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(v *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{ + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2: v, + } +} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner is a convenience function that returns CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 wrapped in CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +func CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(v *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{ + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20: v, + } +} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner is a convenience function that returns CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 wrapped in CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +func CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(v *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{ + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21: v, + } +} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner is a convenience function that returns CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 wrapped in CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +func CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(v *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{ + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3: v, + } +} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner is a convenience function that returns CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 wrapped in CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +func CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(v *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{ + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4: v, + } +} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner is a convenience function that returns CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 wrapped in CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +func CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(v *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{ + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5: v, + } +} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner is a convenience function that returns CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 wrapped in CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +func CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(v *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{ + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6: v, + } +} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner is a convenience function that returns CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 wrapped in CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +func CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(v *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{ + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7: v, + } +} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner is a convenience function that returns CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 wrapped in CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +func CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(v *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{ + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8: v, + } +} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner is a convenience function that returns CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 wrapped in CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner +func CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9AsCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(v *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{ + CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf + err = newStrictDecoder(data).Decode(&dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) + if err == nil { + jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) + if string(jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf = nil + } else { + if err = validator.Validate(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf); err != nil { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf = nil + } else { + match++ + } + } + } else { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf = nil + } + + // try to unmarshal data into CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 + err = newStrictDecoder(data).Decode(&dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) + if err == nil { + jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) + if string(jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 = nil + } else { + if err = validator.Validate(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1); err != nil { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 = nil + } else { + match++ + } + } + } else { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 = nil + } + + // try to unmarshal data into CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 + err = newStrictDecoder(data).Decode(&dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) + if err == nil { + jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) + if string(jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 = nil + } else { + if err = validator.Validate(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10); err != nil { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 = nil + } else { + match++ + } + } + } else { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 = nil + } + + // try to unmarshal data into CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 + err = newStrictDecoder(data).Decode(&dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) + if err == nil { + jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) + if string(jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 = nil + } else { + if err = validator.Validate(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11); err != nil { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 = nil + } else { + match++ + } + } + } else { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 = nil + } + + // try to unmarshal data into CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 + err = newStrictDecoder(data).Decode(&dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) + if err == nil { + jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) + if string(jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 = nil + } else { + if err = validator.Validate(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12); err != nil { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 = nil + } else { + match++ + } + } + } else { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 = nil + } + + // try to unmarshal data into CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 + err = newStrictDecoder(data).Decode(&dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) + if err == nil { + jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) + if string(jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 = nil + } else { + if err = validator.Validate(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13); err != nil { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 = nil + } else { + match++ + } + } + } else { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 = nil + } + + // try to unmarshal data into CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 + err = newStrictDecoder(data).Decode(&dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) + if err == nil { + jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) + if string(jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 = nil + } else { + if err = validator.Validate(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14); err != nil { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 = nil + } else { + match++ + } + } + } else { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 = nil + } + + // try to unmarshal data into CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 + err = newStrictDecoder(data).Decode(&dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) + if err == nil { + jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) + if string(jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 = nil + } else { + if err = validator.Validate(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15); err != nil { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 = nil + } else { + match++ + } + } + } else { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 = nil + } + + // try to unmarshal data into CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 + err = newStrictDecoder(data).Decode(&dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) + if err == nil { + jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) + if string(jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 = nil + } else { + if err = validator.Validate(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16); err != nil { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 = nil + } else { + match++ + } + } + } else { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 = nil + } + + // try to unmarshal data into CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 + err = newStrictDecoder(data).Decode(&dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) + if err == nil { + jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) + if string(jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 = nil + } else { + if err = validator.Validate(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17); err != nil { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 = nil + } else { + match++ + } + } + } else { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 = nil + } + + // try to unmarshal data into CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 + err = newStrictDecoder(data).Decode(&dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) + if err == nil { + jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) + if string(jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 = nil + } else { + if err = validator.Validate(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18); err != nil { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 = nil + } else { + match++ + } + } + } else { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 = nil + } + + // try to unmarshal data into CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 + err = newStrictDecoder(data).Decode(&dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) + if err == nil { + jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) + if string(jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 = nil + } else { + if err = validator.Validate(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19); err != nil { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 = nil + } else { + match++ + } + } + } else { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 = nil + } + + // try to unmarshal data into CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 + err = newStrictDecoder(data).Decode(&dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) + if err == nil { + jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) + if string(jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 = nil + } else { + if err = validator.Validate(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2); err != nil { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 = nil + } else { + match++ + } + } + } else { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 = nil + } + + // try to unmarshal data into CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 + err = newStrictDecoder(data).Decode(&dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) + if err == nil { + jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) + if string(jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 = nil + } else { + if err = validator.Validate(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20); err != nil { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 = nil + } else { + match++ + } + } + } else { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 = nil + } + + // try to unmarshal data into CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 + err = newStrictDecoder(data).Decode(&dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) + if err == nil { + jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) + if string(jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 = nil + } else { + if err = validator.Validate(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21); err != nil { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 = nil + } else { + match++ + } + } + } else { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 = nil + } + + // try to unmarshal data into CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 + err = newStrictDecoder(data).Decode(&dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) + if err == nil { + jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) + if string(jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 = nil + } else { + if err = validator.Validate(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3); err != nil { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 = nil + } else { + match++ + } + } + } else { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 = nil + } + + // try to unmarshal data into CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 + err = newStrictDecoder(data).Decode(&dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) + if err == nil { + jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) + if string(jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 = nil + } else { + if err = validator.Validate(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4); err != nil { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 = nil + } else { + match++ + } + } + } else { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 = nil + } + + // try to unmarshal data into CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 + err = newStrictDecoder(data).Decode(&dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) + if err == nil { + jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) + if string(jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 = nil + } else { + if err = validator.Validate(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5); err != nil { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 = nil + } else { + match++ + } + } + } else { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 = nil + } + + // try to unmarshal data into CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 + err = newStrictDecoder(data).Decode(&dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) + if err == nil { + jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) + if string(jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 = nil + } else { + if err = validator.Validate(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6); err != nil { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 = nil + } else { + match++ + } + } + } else { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 = nil + } + + // try to unmarshal data into CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 + err = newStrictDecoder(data).Decode(&dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) + if err == nil { + jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) + if string(jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 = nil + } else { + if err = validator.Validate(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7); err != nil { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 = nil + } else { + match++ + } + } + } else { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 = nil + } + + // try to unmarshal data into CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 + err = newStrictDecoder(data).Decode(&dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) + if err == nil { + jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) + if string(jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 = nil + } else { + if err = validator.Validate(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8); err != nil { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 = nil + } else { + match++ + } + } + } else { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 = nil + } + + // try to unmarshal data into CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 + err = newStrictDecoder(data).Decode(&dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) + if err == nil { + jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) + if string(jsonCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 = nil + } else { + if err = validator.Validate(dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9); err != nil { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 = nil + } else { + match++ + } + } + } else { + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf = nil + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 = nil + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 = nil + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 = nil + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 = nil + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 = nil + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 = nil + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 = nil + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 = nil + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 = nil + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 = nil + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 = nil + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 = nil + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 = nil + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 = nil + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 = nil + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 = nil + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 = nil + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 = nil + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 = nil + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 = nil + dst.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 = nil + + return fmt.Errorf("data matches more than one schema in oneOf(CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner) MarshalJSON() ([]byte, error) { + if src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) + } + + if src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) + } + + if src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) + } + + if src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) + } + + if src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) + } + + if src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) + } + + if src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) + } + + if src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) + } + + if src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) + } + + if src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) + } + + if src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) + } + + if src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) + } + + if src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) + } + + if src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) + } + + if src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) + } + + if src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) + } + + if src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) + } + + if src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) + } + + if src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) + } + + if src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) + } + + if src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) + } + + if src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf != nil { + return obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 != nil { + return obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 != nil { + return obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 != nil { + return obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 != nil { + return obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 != nil { + return obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 != nil { + return obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 != nil { + return obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 != nil { + return obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 != nil { + return obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 != nil { + return obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 != nil { + return obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 != nil { + return obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 != nil { + return obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 != nil { + return obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 != nil { + return obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 != nil { + return obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 != nil { + return obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 != nil { + return obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 != nil { + return obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 != nil { + return obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 != nil { + return obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner) GetActualInstanceValue() (interface{}) { + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf != nil { + return *obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 != nil { + return *obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 != nil { + return *obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 != nil { + return *obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 != nil { + return *obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 != nil { + return *obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 != nil { + return *obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 != nil { + return *obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 != nil { + return *obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 != nil { + return *obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 != nil { + return *obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 != nil { + return *obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 != nil { + return *obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 != nil { + return *obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 != nil { + return *obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 != nil { + return *obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 != nil { + return *obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 != nil { + return *obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 != nil { + return *obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 != nil { + return *obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 != nil { + return *obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 + } + + if obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 != nil { + return *obj.CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 + } + + // all schemas are nil + return nil +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of.go new file mode 100644 index 00000000..c1b02612 --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf struct { + JiraPropertyId string `json:"jiraPropertyId"` + Map []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner `json:"map"` + Field ENUMISSUESEVERITY `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf(jiraPropertyId string, map_ []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, field ENUMISSUESEVERITY) *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf{} + this.JiraPropertyId = jiraPropertyId + this.Map = map_ + this.Field = field + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfWithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfWithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf{} + return &this +} + +// GetJiraPropertyId returns the JiraPropertyId field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) GetJiraPropertyId() string { + if o == nil { + var ret string + return ret + } + + return o.JiraPropertyId +} + +// GetJiraPropertyIdOk returns a tuple with the JiraPropertyId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) GetJiraPropertyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraPropertyId, true +} + +// SetJiraPropertyId sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) SetJiraPropertyId(v string) { + o.JiraPropertyId = v +} + +// GetMap returns the Map field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) GetMap() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + return ret + } + + return o.Map +} + +// GetMapOk returns a tuple with the Map field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) GetMapOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, bool) { + if o == nil { + return nil, false + } + return o.Map, true +} + +// SetMap sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) SetMap(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + o.Map = v +} + +// GetField returns the Field field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) GetField() ENUMISSUESEVERITY { + if o == nil { + var ret ENUMISSUESEVERITY + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) GetFieldOk() (*ENUMISSUESEVERITY, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) SetField(v ENUMISSUESEVERITY) { + o.Field = v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraPropertyId"] = o.JiraPropertyId + toSerialize["map"] = o.Map + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraPropertyId", + "map", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraPropertyId") + delete(additionalProperties, "map") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_1.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_1.go new file mode 100644 index 00000000..c59437a8 --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_1.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 struct { + JiraPropertyId string `json:"jiraPropertyId"` + Map []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner `json:"map"` + Field ENUMISSUECREATEDAT `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1(jiraPropertyId string, map_ []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, field ENUMISSUECREATEDAT) *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1{} + this.JiraPropertyId = jiraPropertyId + this.Map = map_ + this.Field = field + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1WithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1WithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1{} + return &this +} + +// GetJiraPropertyId returns the JiraPropertyId field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) GetJiraPropertyId() string { + if o == nil { + var ret string + return ret + } + + return o.JiraPropertyId +} + +// GetJiraPropertyIdOk returns a tuple with the JiraPropertyId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) GetJiraPropertyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraPropertyId, true +} + +// SetJiraPropertyId sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) SetJiraPropertyId(v string) { + o.JiraPropertyId = v +} + +// GetMap returns the Map field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) GetMap() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + return ret + } + + return o.Map +} + +// GetMapOk returns a tuple with the Map field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) GetMapOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, bool) { + if o == nil { + return nil, false + } + return o.Map, true +} + +// SetMap sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) SetMap(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + o.Map = v +} + +// GetField returns the Field field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) GetField() ENUMISSUECREATEDAT { + if o == nil { + var ret ENUMISSUECREATEDAT + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) GetFieldOk() (*ENUMISSUECREATEDAT, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) SetField(v ENUMISSUECREATEDAT) { + o.Field = v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraPropertyId"] = o.JiraPropertyId + toSerialize["map"] = o.Map + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraPropertyId", + "map", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraPropertyId") + delete(additionalProperties, "map") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1 { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf1) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_10.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_10.go new file mode 100644 index 00000000..fbc114dc --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_10.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 struct { + JiraPropertyId string `json:"jiraPropertyId"` + Map []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner `json:"map"` + Field ENUMISSUELINKINSCAN `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10(jiraPropertyId string, map_ []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, field ENUMISSUELINKINSCAN) *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10{} + this.JiraPropertyId = jiraPropertyId + this.Map = map_ + this.Field = field + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10WithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10WithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10{} + return &this +} + +// GetJiraPropertyId returns the JiraPropertyId field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) GetJiraPropertyId() string { + if o == nil { + var ret string + return ret + } + + return o.JiraPropertyId +} + +// GetJiraPropertyIdOk returns a tuple with the JiraPropertyId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) GetJiraPropertyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraPropertyId, true +} + +// SetJiraPropertyId sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) SetJiraPropertyId(v string) { + o.JiraPropertyId = v +} + +// GetMap returns the Map field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) GetMap() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + return ret + } + + return o.Map +} + +// GetMapOk returns a tuple with the Map field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) GetMapOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, bool) { + if o == nil { + return nil, false + } + return o.Map, true +} + +// SetMap sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) SetMap(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + o.Map = v +} + +// GetField returns the Field field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) GetField() ENUMISSUELINKINSCAN { + if o == nil { + var ret ENUMISSUELINKINSCAN + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) GetFieldOk() (*ENUMISSUELINKINSCAN, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) SetField(v ENUMISSUELINKINSCAN) { + o.Field = v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraPropertyId"] = o.JiraPropertyId + toSerialize["map"] = o.Map + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraPropertyId", + "map", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraPropertyId") + delete(additionalProperties, "map") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10 { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf10) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_11.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_11.go new file mode 100644 index 00000000..6b937b19 --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_11.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 struct { + JiraPropertyId string `json:"jiraPropertyId"` + Map []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner `json:"map"` + Field ENUMISSUELINKINPROFILE `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11(jiraPropertyId string, map_ []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, field ENUMISSUELINKINPROFILE) *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11{} + this.JiraPropertyId = jiraPropertyId + this.Map = map_ + this.Field = field + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11WithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11WithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11{} + return &this +} + +// GetJiraPropertyId returns the JiraPropertyId field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) GetJiraPropertyId() string { + if o == nil { + var ret string + return ret + } + + return o.JiraPropertyId +} + +// GetJiraPropertyIdOk returns a tuple with the JiraPropertyId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) GetJiraPropertyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraPropertyId, true +} + +// SetJiraPropertyId sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) SetJiraPropertyId(v string) { + o.JiraPropertyId = v +} + +// GetMap returns the Map field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) GetMap() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + return ret + } + + return o.Map +} + +// GetMapOk returns a tuple with the Map field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) GetMapOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, bool) { + if o == nil { + return nil, false + } + return o.Map, true +} + +// SetMap sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) SetMap(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + o.Map = v +} + +// GetField returns the Field field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) GetField() ENUMISSUELINKINPROFILE { + if o == nil { + var ret ENUMISSUELINKINPROFILE + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) GetFieldOk() (*ENUMISSUELINKINPROFILE, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) SetField(v ENUMISSUELINKINPROFILE) { + o.Field = v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraPropertyId"] = o.JiraPropertyId + toSerialize["map"] = o.Map + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraPropertyId", + "map", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraPropertyId") + delete(additionalProperties, "map") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11 { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf11) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_12.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_12.go new file mode 100644 index 00000000..099457cd --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_12.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 struct { + JiraPropertyId string `json:"jiraPropertyId"` + Map []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner `json:"map"` + Field ENUMPROFILENAME `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12(jiraPropertyId string, map_ []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, field ENUMPROFILENAME) *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12{} + this.JiraPropertyId = jiraPropertyId + this.Map = map_ + this.Field = field + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12WithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12WithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12{} + return &this +} + +// GetJiraPropertyId returns the JiraPropertyId field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) GetJiraPropertyId() string { + if o == nil { + var ret string + return ret + } + + return o.JiraPropertyId +} + +// GetJiraPropertyIdOk returns a tuple with the JiraPropertyId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) GetJiraPropertyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraPropertyId, true +} + +// SetJiraPropertyId sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) SetJiraPropertyId(v string) { + o.JiraPropertyId = v +} + +// GetMap returns the Map field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) GetMap() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + return ret + } + + return o.Map +} + +// GetMapOk returns a tuple with the Map field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) GetMapOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, bool) { + if o == nil { + return nil, false + } + return o.Map, true +} + +// SetMap sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) SetMap(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + o.Map = v +} + +// GetField returns the Field field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) GetField() ENUMPROFILENAME { + if o == nil { + var ret ENUMPROFILENAME + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) GetFieldOk() (*ENUMPROFILENAME, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) SetField(v ENUMPROFILENAME) { + o.Field = v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraPropertyId"] = o.JiraPropertyId + toSerialize["map"] = o.Map + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraPropertyId", + "map", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraPropertyId") + delete(additionalProperties, "map") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12 { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf12) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_13.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_13.go new file mode 100644 index 00000000..08fd2494 --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_13.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 struct { + JiraPropertyId string `json:"jiraPropertyId"` + Map []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner `json:"map"` + Field ENUMPROFILESCANNERKIND `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13(jiraPropertyId string, map_ []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, field ENUMPROFILESCANNERKIND) *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13{} + this.JiraPropertyId = jiraPropertyId + this.Map = map_ + this.Field = field + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13WithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13WithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13{} + return &this +} + +// GetJiraPropertyId returns the JiraPropertyId field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) GetJiraPropertyId() string { + if o == nil { + var ret string + return ret + } + + return o.JiraPropertyId +} + +// GetJiraPropertyIdOk returns a tuple with the JiraPropertyId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) GetJiraPropertyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraPropertyId, true +} + +// SetJiraPropertyId sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) SetJiraPropertyId(v string) { + o.JiraPropertyId = v +} + +// GetMap returns the Map field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) GetMap() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + return ret + } + + return o.Map +} + +// GetMapOk returns a tuple with the Map field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) GetMapOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, bool) { + if o == nil { + return nil, false + } + return o.Map, true +} + +// SetMap sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) SetMap(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + o.Map = v +} + +// GetField returns the Field field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) GetField() ENUMPROFILESCANNERKIND { + if o == nil { + var ret ENUMPROFILESCANNERKIND + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) GetFieldOk() (*ENUMPROFILESCANNERKIND, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) SetField(v ENUMPROFILESCANNERKIND) { + o.Field = v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraPropertyId"] = o.JiraPropertyId + toSerialize["map"] = o.Map + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraPropertyId", + "map", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraPropertyId") + delete(additionalProperties, "map") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13 { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf13) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_14.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_14.go new file mode 100644 index 00000000..6794e8e3 --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_14.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 struct { + JiraPropertyId string `json:"jiraPropertyId"` + Map []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner `json:"map"` + Field ENUMASSETNAME `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14(jiraPropertyId string, map_ []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, field ENUMASSETNAME) *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14{} + this.JiraPropertyId = jiraPropertyId + this.Map = map_ + this.Field = field + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14WithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14WithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14{} + return &this +} + +// GetJiraPropertyId returns the JiraPropertyId field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) GetJiraPropertyId() string { + if o == nil { + var ret string + return ret + } + + return o.JiraPropertyId +} + +// GetJiraPropertyIdOk returns a tuple with the JiraPropertyId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) GetJiraPropertyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraPropertyId, true +} + +// SetJiraPropertyId sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) SetJiraPropertyId(v string) { + o.JiraPropertyId = v +} + +// GetMap returns the Map field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) GetMap() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + return ret + } + + return o.Map +} + +// GetMapOk returns a tuple with the Map field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) GetMapOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, bool) { + if o == nil { + return nil, false + } + return o.Map, true +} + +// SetMap sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) SetMap(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + o.Map = v +} + +// GetField returns the Field field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) GetField() ENUMASSETNAME { + if o == nil { + var ret ENUMASSETNAME + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) GetFieldOk() (*ENUMASSETNAME, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) SetField(v ENUMASSETNAME) { + o.Field = v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraPropertyId"] = o.JiraPropertyId + toSerialize["map"] = o.Map + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraPropertyId", + "map", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraPropertyId") + delete(additionalProperties, "map") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14 { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf14) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_15.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_15.go new file mode 100644 index 00000000..d6eff4e6 --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_15.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 struct { + JiraPropertyId string `json:"jiraPropertyId"` + Map []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner `json:"map"` + Field ENUMASSETURL `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15(jiraPropertyId string, map_ []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, field ENUMASSETURL) *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15{} + this.JiraPropertyId = jiraPropertyId + this.Map = map_ + this.Field = field + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15WithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15WithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15{} + return &this +} + +// GetJiraPropertyId returns the JiraPropertyId field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) GetJiraPropertyId() string { + if o == nil { + var ret string + return ret + } + + return o.JiraPropertyId +} + +// GetJiraPropertyIdOk returns a tuple with the JiraPropertyId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) GetJiraPropertyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraPropertyId, true +} + +// SetJiraPropertyId sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) SetJiraPropertyId(v string) { + o.JiraPropertyId = v +} + +// GetMap returns the Map field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) GetMap() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + return ret + } + + return o.Map +} + +// GetMapOk returns a tuple with the Map field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) GetMapOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, bool) { + if o == nil { + return nil, false + } + return o.Map, true +} + +// SetMap sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) SetMap(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + o.Map = v +} + +// GetField returns the Field field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) GetField() ENUMASSETURL { + if o == nil { + var ret ENUMASSETURL + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) GetFieldOk() (*ENUMASSETURL, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) SetField(v ENUMASSETURL) { + o.Field = v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraPropertyId"] = o.JiraPropertyId + toSerialize["map"] = o.Map + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraPropertyId", + "map", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraPropertyId") + delete(additionalProperties, "map") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15 { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf15) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_16.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_16.go new file mode 100644 index 00000000..5585242d --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_16.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 struct { + JiraPropertyId string `json:"jiraPropertyId"` + Map []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner `json:"map"` + Field ENUMASSETTAGS `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16(jiraPropertyId string, map_ []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, field ENUMASSETTAGS) *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16{} + this.JiraPropertyId = jiraPropertyId + this.Map = map_ + this.Field = field + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16WithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16WithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16{} + return &this +} + +// GetJiraPropertyId returns the JiraPropertyId field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) GetJiraPropertyId() string { + if o == nil { + var ret string + return ret + } + + return o.JiraPropertyId +} + +// GetJiraPropertyIdOk returns a tuple with the JiraPropertyId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) GetJiraPropertyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraPropertyId, true +} + +// SetJiraPropertyId sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) SetJiraPropertyId(v string) { + o.JiraPropertyId = v +} + +// GetMap returns the Map field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) GetMap() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + return ret + } + + return o.Map +} + +// GetMapOk returns a tuple with the Map field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) GetMapOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, bool) { + if o == nil { + return nil, false + } + return o.Map, true +} + +// SetMap sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) SetMap(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + o.Map = v +} + +// GetField returns the Field field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) GetField() ENUMASSETTAGS { + if o == nil { + var ret ENUMASSETTAGS + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) GetFieldOk() (*ENUMASSETTAGS, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) SetField(v ENUMASSETTAGS) { + o.Field = v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraPropertyId"] = o.JiraPropertyId + toSerialize["map"] = o.Map + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraPropertyId", + "map", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraPropertyId") + delete(additionalProperties, "map") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16 { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf16) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_17.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_17.go new file mode 100644 index 00000000..79e6ce1a --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_17.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 struct { + JiraPropertyId string `json:"jiraPropertyId"` + Map []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner `json:"map"` + Field ENUMASSETEXTERNALURL `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17(jiraPropertyId string, map_ []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, field ENUMASSETEXTERNALURL) *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17{} + this.JiraPropertyId = jiraPropertyId + this.Map = map_ + this.Field = field + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17WithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17WithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17{} + return &this +} + +// GetJiraPropertyId returns the JiraPropertyId field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) GetJiraPropertyId() string { + if o == nil { + var ret string + return ret + } + + return o.JiraPropertyId +} + +// GetJiraPropertyIdOk returns a tuple with the JiraPropertyId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) GetJiraPropertyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraPropertyId, true +} + +// SetJiraPropertyId sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) SetJiraPropertyId(v string) { + o.JiraPropertyId = v +} + +// GetMap returns the Map field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) GetMap() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + return ret + } + + return o.Map +} + +// GetMapOk returns a tuple with the Map field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) GetMapOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, bool) { + if o == nil { + return nil, false + } + return o.Map, true +} + +// SetMap sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) SetMap(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + o.Map = v +} + +// GetField returns the Field field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) GetField() ENUMASSETEXTERNALURL { + if o == nil { + var ret ENUMASSETEXTERNALURL + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) GetFieldOk() (*ENUMASSETEXTERNALURL, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) SetField(v ENUMASSETEXTERNALURL) { + o.Field = v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraPropertyId"] = o.JiraPropertyId + toSerialize["map"] = o.Map + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraPropertyId", + "map", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraPropertyId") + delete(additionalProperties, "map") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17 { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf17) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_18.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_18.go new file mode 100644 index 00000000..149513a0 --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_18.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 struct { + JiraPropertyId string `json:"jiraPropertyId"` + Map []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner `json:"map"` + Field ENUMASSETTYPE `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18(jiraPropertyId string, map_ []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, field ENUMASSETTYPE) *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18{} + this.JiraPropertyId = jiraPropertyId + this.Map = map_ + this.Field = field + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18WithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18WithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18{} + return &this +} + +// GetJiraPropertyId returns the JiraPropertyId field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) GetJiraPropertyId() string { + if o == nil { + var ret string + return ret + } + + return o.JiraPropertyId +} + +// GetJiraPropertyIdOk returns a tuple with the JiraPropertyId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) GetJiraPropertyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraPropertyId, true +} + +// SetJiraPropertyId sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) SetJiraPropertyId(v string) { + o.JiraPropertyId = v +} + +// GetMap returns the Map field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) GetMap() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + return ret + } + + return o.Map +} + +// GetMapOk returns a tuple with the Map field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) GetMapOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, bool) { + if o == nil { + return nil, false + } + return o.Map, true +} + +// SetMap sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) SetMap(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + o.Map = v +} + +// GetField returns the Field field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) GetField() ENUMASSETTYPE { + if o == nil { + var ret ENUMASSETTYPE + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) GetFieldOk() (*ENUMASSETTYPE, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) SetField(v ENUMASSETTYPE) { + o.Field = v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraPropertyId"] = o.JiraPropertyId + toSerialize["map"] = o.Map + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraPropertyId", + "map", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraPropertyId") + delete(additionalProperties, "map") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18 { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf18) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_19.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_19.go new file mode 100644 index 00000000..06294c48 --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_19.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 struct { + JiraPropertyId string `json:"jiraPropertyId"` + Map []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner `json:"map"` + Field ENUMASSETCLASS `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19(jiraPropertyId string, map_ []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, field ENUMASSETCLASS) *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19{} + this.JiraPropertyId = jiraPropertyId + this.Map = map_ + this.Field = field + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19WithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19WithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19{} + return &this +} + +// GetJiraPropertyId returns the JiraPropertyId field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) GetJiraPropertyId() string { + if o == nil { + var ret string + return ret + } + + return o.JiraPropertyId +} + +// GetJiraPropertyIdOk returns a tuple with the JiraPropertyId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) GetJiraPropertyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraPropertyId, true +} + +// SetJiraPropertyId sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) SetJiraPropertyId(v string) { + o.JiraPropertyId = v +} + +// GetMap returns the Map field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) GetMap() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + return ret + } + + return o.Map +} + +// GetMapOk returns a tuple with the Map field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) GetMapOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, bool) { + if o == nil { + return nil, false + } + return o.Map, true +} + +// SetMap sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) SetMap(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + o.Map = v +} + +// GetField returns the Field field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) GetField() ENUMASSETCLASS { + if o == nil { + var ret ENUMASSETCLASS + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) GetFieldOk() (*ENUMASSETCLASS, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) SetField(v ENUMASSETCLASS) { + o.Field = v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraPropertyId"] = o.JiraPropertyId + toSerialize["map"] = o.Map + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraPropertyId", + "map", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraPropertyId") + delete(additionalProperties, "map") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19 { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf19) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_2.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_2.go new file mode 100644 index 00000000..a55f0423 --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_2.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 struct { + JiraPropertyId string `json:"jiraPropertyId"` + Map []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner `json:"map"` + Field ENUMISSUENAME `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2(jiraPropertyId string, map_ []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, field ENUMISSUENAME) *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2{} + this.JiraPropertyId = jiraPropertyId + this.Map = map_ + this.Field = field + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2WithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2WithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2{} + return &this +} + +// GetJiraPropertyId returns the JiraPropertyId field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) GetJiraPropertyId() string { + if o == nil { + var ret string + return ret + } + + return o.JiraPropertyId +} + +// GetJiraPropertyIdOk returns a tuple with the JiraPropertyId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) GetJiraPropertyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraPropertyId, true +} + +// SetJiraPropertyId sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) SetJiraPropertyId(v string) { + o.JiraPropertyId = v +} + +// GetMap returns the Map field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) GetMap() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + return ret + } + + return o.Map +} + +// GetMapOk returns a tuple with the Map field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) GetMapOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, bool) { + if o == nil { + return nil, false + } + return o.Map, true +} + +// SetMap sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) SetMap(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + o.Map = v +} + +// GetField returns the Field field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) GetField() ENUMISSUENAME { + if o == nil { + var ret ENUMISSUENAME + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) GetFieldOk() (*ENUMISSUENAME, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) SetField(v ENUMISSUENAME) { + o.Field = v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraPropertyId"] = o.JiraPropertyId + toSerialize["map"] = o.Map + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraPropertyId", + "map", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraPropertyId") + delete(additionalProperties, "map") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2 { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf2) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_20.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_20.go new file mode 100644 index 00000000..1183890e --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_20.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 struct { + JiraPropertyId string `json:"jiraPropertyId"` + Map []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner `json:"map"` + Field ENUMCUSTOMRULENAME `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20(jiraPropertyId string, map_ []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, field ENUMCUSTOMRULENAME) *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20{} + this.JiraPropertyId = jiraPropertyId + this.Map = map_ + this.Field = field + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20WithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20WithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20{} + return &this +} + +// GetJiraPropertyId returns the JiraPropertyId field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) GetJiraPropertyId() string { + if o == nil { + var ret string + return ret + } + + return o.JiraPropertyId +} + +// GetJiraPropertyIdOk returns a tuple with the JiraPropertyId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) GetJiraPropertyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraPropertyId, true +} + +// SetJiraPropertyId sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) SetJiraPropertyId(v string) { + o.JiraPropertyId = v +} + +// GetMap returns the Map field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) GetMap() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + return ret + } + + return o.Map +} + +// GetMapOk returns a tuple with the Map field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) GetMapOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, bool) { + if o == nil { + return nil, false + } + return o.Map, true +} + +// SetMap sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) SetMap(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + o.Map = v +} + +// GetField returns the Field field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) GetField() ENUMCUSTOMRULENAME { + if o == nil { + var ret ENUMCUSTOMRULENAME + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) GetFieldOk() (*ENUMCUSTOMRULENAME, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) SetField(v ENUMCUSTOMRULENAME) { + o.Field = v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraPropertyId"] = o.JiraPropertyId + toSerialize["map"] = o.Map + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraPropertyId", + "map", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraPropertyId") + delete(additionalProperties, "map") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20 { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf20) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_21.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_21.go new file mode 100644 index 00000000..a5b564dc --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_21.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 struct { + JiraPropertyId string `json:"jiraPropertyId"` + Map []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner `json:"map"` + Field ENUMCUSTOMRULELINK `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21(jiraPropertyId string, map_ []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, field ENUMCUSTOMRULELINK) *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21{} + this.JiraPropertyId = jiraPropertyId + this.Map = map_ + this.Field = field + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21WithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21WithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21{} + return &this +} + +// GetJiraPropertyId returns the JiraPropertyId field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) GetJiraPropertyId() string { + if o == nil { + var ret string + return ret + } + + return o.JiraPropertyId +} + +// GetJiraPropertyIdOk returns a tuple with the JiraPropertyId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) GetJiraPropertyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraPropertyId, true +} + +// SetJiraPropertyId sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) SetJiraPropertyId(v string) { + o.JiraPropertyId = v +} + +// GetMap returns the Map field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) GetMap() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + return ret + } + + return o.Map +} + +// GetMapOk returns a tuple with the Map field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) GetMapOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, bool) { + if o == nil { + return nil, false + } + return o.Map, true +} + +// SetMap sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) SetMap(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + o.Map = v +} + +// GetField returns the Field field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) GetField() ENUMCUSTOMRULELINK { + if o == nil { + var ret ENUMCUSTOMRULELINK + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) GetFieldOk() (*ENUMCUSTOMRULELINK, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) SetField(v ENUMCUSTOMRULELINK) { + o.Field = v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraPropertyId"] = o.JiraPropertyId + toSerialize["map"] = o.Map + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraPropertyId", + "map", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraPropertyId") + delete(additionalProperties, "map") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21 { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf21) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_3.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_3.go new file mode 100644 index 00000000..e9b9652b --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_3.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 struct { + JiraPropertyId string `json:"jiraPropertyId"` + Map []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner `json:"map"` + Field ENUMISSUECATEGORY `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3(jiraPropertyId string, map_ []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, field ENUMISSUECATEGORY) *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3{} + this.JiraPropertyId = jiraPropertyId + this.Map = map_ + this.Field = field + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3WithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3WithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3{} + return &this +} + +// GetJiraPropertyId returns the JiraPropertyId field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) GetJiraPropertyId() string { + if o == nil { + var ret string + return ret + } + + return o.JiraPropertyId +} + +// GetJiraPropertyIdOk returns a tuple with the JiraPropertyId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) GetJiraPropertyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraPropertyId, true +} + +// SetJiraPropertyId sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) SetJiraPropertyId(v string) { + o.JiraPropertyId = v +} + +// GetMap returns the Map field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) GetMap() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + return ret + } + + return o.Map +} + +// GetMapOk returns a tuple with the Map field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) GetMapOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, bool) { + if o == nil { + return nil, false + } + return o.Map, true +} + +// SetMap sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) SetMap(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + o.Map = v +} + +// GetField returns the Field field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) GetField() ENUMISSUECATEGORY { + if o == nil { + var ret ENUMISSUECATEGORY + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) GetFieldOk() (*ENUMISSUECATEGORY, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) SetField(v ENUMISSUECATEGORY) { + o.Field = v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraPropertyId"] = o.JiraPropertyId + toSerialize["map"] = o.Map + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraPropertyId", + "map", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraPropertyId") + delete(additionalProperties, "map") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3 { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf3) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_4.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_4.go new file mode 100644 index 00000000..2e543ae9 --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_4.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 struct { + JiraPropertyId string `json:"jiraPropertyId"` + Map []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner `json:"map"` + Field ENUMISSUECONTEXT `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4(jiraPropertyId string, map_ []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, field ENUMISSUECONTEXT) *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4{} + this.JiraPropertyId = jiraPropertyId + this.Map = map_ + this.Field = field + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4WithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4WithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4{} + return &this +} + +// GetJiraPropertyId returns the JiraPropertyId field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) GetJiraPropertyId() string { + if o == nil { + var ret string + return ret + } + + return o.JiraPropertyId +} + +// GetJiraPropertyIdOk returns a tuple with the JiraPropertyId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) GetJiraPropertyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraPropertyId, true +} + +// SetJiraPropertyId sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) SetJiraPropertyId(v string) { + o.JiraPropertyId = v +} + +// GetMap returns the Map field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) GetMap() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + return ret + } + + return o.Map +} + +// GetMapOk returns a tuple with the Map field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) GetMapOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, bool) { + if o == nil { + return nil, false + } + return o.Map, true +} + +// SetMap sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) SetMap(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + o.Map = v +} + +// GetField returns the Field field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) GetField() ENUMISSUECONTEXT { + if o == nil { + var ret ENUMISSUECONTEXT + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) GetFieldOk() (*ENUMISSUECONTEXT, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) SetField(v ENUMISSUECONTEXT) { + o.Field = v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraPropertyId"] = o.JiraPropertyId + toSerialize["map"] = o.Map + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraPropertyId", + "map", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraPropertyId") + delete(additionalProperties, "map") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4 { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf4) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_5.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_5.go new file mode 100644 index 00000000..982e44c3 --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_5.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 struct { + JiraPropertyId string `json:"jiraPropertyId"` + Map []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner `json:"map"` + Field ENUMISSUESTATUS `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5(jiraPropertyId string, map_ []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, field ENUMISSUESTATUS) *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5{} + this.JiraPropertyId = jiraPropertyId + this.Map = map_ + this.Field = field + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5WithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5WithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5{} + return &this +} + +// GetJiraPropertyId returns the JiraPropertyId field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) GetJiraPropertyId() string { + if o == nil { + var ret string + return ret + } + + return o.JiraPropertyId +} + +// GetJiraPropertyIdOk returns a tuple with the JiraPropertyId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) GetJiraPropertyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraPropertyId, true +} + +// SetJiraPropertyId sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) SetJiraPropertyId(v string) { + o.JiraPropertyId = v +} + +// GetMap returns the Map field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) GetMap() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + return ret + } + + return o.Map +} + +// GetMapOk returns a tuple with the Map field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) GetMapOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, bool) { + if o == nil { + return nil, false + } + return o.Map, true +} + +// SetMap sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) SetMap(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + o.Map = v +} + +// GetField returns the Field field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) GetField() ENUMISSUESTATUS { + if o == nil { + var ret ENUMISSUESTATUS + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) GetFieldOk() (*ENUMISSUESTATUS, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) SetField(v ENUMISSUESTATUS) { + o.Field = v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraPropertyId"] = o.JiraPropertyId + toSerialize["map"] = o.Map + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraPropertyId", + "map", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraPropertyId") + delete(additionalProperties, "map") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5 { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf5) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_6.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_6.go new file mode 100644 index 00000000..4d5d4900 --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_6.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 struct { + JiraPropertyId string `json:"jiraPropertyId"` + Map []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner `json:"map"` + Field ENUMISSUEREMEDIATION `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6(jiraPropertyId string, map_ []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, field ENUMISSUEREMEDIATION) *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6{} + this.JiraPropertyId = jiraPropertyId + this.Map = map_ + this.Field = field + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6WithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6WithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6{} + return &this +} + +// GetJiraPropertyId returns the JiraPropertyId field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) GetJiraPropertyId() string { + if o == nil { + var ret string + return ret + } + + return o.JiraPropertyId +} + +// GetJiraPropertyIdOk returns a tuple with the JiraPropertyId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) GetJiraPropertyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraPropertyId, true +} + +// SetJiraPropertyId sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) SetJiraPropertyId(v string) { + o.JiraPropertyId = v +} + +// GetMap returns the Map field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) GetMap() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + return ret + } + + return o.Map +} + +// GetMapOk returns a tuple with the Map field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) GetMapOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, bool) { + if o == nil { + return nil, false + } + return o.Map, true +} + +// SetMap sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) SetMap(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + o.Map = v +} + +// GetField returns the Field field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) GetField() ENUMISSUEREMEDIATION { + if o == nil { + var ret ENUMISSUEREMEDIATION + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) GetFieldOk() (*ENUMISSUEREMEDIATION, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) SetField(v ENUMISSUEREMEDIATION) { + o.Field = v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraPropertyId"] = o.JiraPropertyId + toSerialize["map"] = o.Map + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraPropertyId", + "map", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraPropertyId") + delete(additionalProperties, "map") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6 { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf6) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_7.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_7.go new file mode 100644 index 00000000..fd523435 --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_7.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 struct { + JiraPropertyId string `json:"jiraPropertyId"` + Map []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner `json:"map"` + Field ENUMISSUETARGETS `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7(jiraPropertyId string, map_ []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, field ENUMISSUETARGETS) *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7{} + this.JiraPropertyId = jiraPropertyId + this.Map = map_ + this.Field = field + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7WithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7WithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7{} + return &this +} + +// GetJiraPropertyId returns the JiraPropertyId field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) GetJiraPropertyId() string { + if o == nil { + var ret string + return ret + } + + return o.JiraPropertyId +} + +// GetJiraPropertyIdOk returns a tuple with the JiraPropertyId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) GetJiraPropertyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraPropertyId, true +} + +// SetJiraPropertyId sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) SetJiraPropertyId(v string) { + o.JiraPropertyId = v +} + +// GetMap returns the Map field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) GetMap() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + return ret + } + + return o.Map +} + +// GetMapOk returns a tuple with the Map field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) GetMapOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, bool) { + if o == nil { + return nil, false + } + return o.Map, true +} + +// SetMap sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) SetMap(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + o.Map = v +} + +// GetField returns the Field field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) GetField() ENUMISSUETARGETS { + if o == nil { + var ret ENUMISSUETARGETS + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) GetFieldOk() (*ENUMISSUETARGETS, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) SetField(v ENUMISSUETARGETS) { + o.Field = v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraPropertyId"] = o.JiraPropertyId + toSerialize["map"] = o.Map + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraPropertyId", + "map", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraPropertyId") + delete(additionalProperties, "map") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7 { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf7) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_8.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_8.go new file mode 100644 index 00000000..509e4669 --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_8.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 struct { + JiraPropertyId string `json:"jiraPropertyId"` + Map []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner `json:"map"` + Field ENUMISSUELINKINALLISSUES `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8(jiraPropertyId string, map_ []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, field ENUMISSUELINKINALLISSUES) *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8{} + this.JiraPropertyId = jiraPropertyId + this.Map = map_ + this.Field = field + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8WithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8WithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8{} + return &this +} + +// GetJiraPropertyId returns the JiraPropertyId field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) GetJiraPropertyId() string { + if o == nil { + var ret string + return ret + } + + return o.JiraPropertyId +} + +// GetJiraPropertyIdOk returns a tuple with the JiraPropertyId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) GetJiraPropertyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraPropertyId, true +} + +// SetJiraPropertyId sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) SetJiraPropertyId(v string) { + o.JiraPropertyId = v +} + +// GetMap returns the Map field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) GetMap() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + return ret + } + + return o.Map +} + +// GetMapOk returns a tuple with the Map field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) GetMapOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, bool) { + if o == nil { + return nil, false + } + return o.Map, true +} + +// SetMap sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) SetMap(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + o.Map = v +} + +// GetField returns the Field field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) GetField() ENUMISSUELINKINALLISSUES { + if o == nil { + var ret ENUMISSUELINKINALLISSUES + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) GetFieldOk() (*ENUMISSUELINKINALLISSUES, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) SetField(v ENUMISSUELINKINALLISSUES) { + o.Field = v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraPropertyId"] = o.JiraPropertyId + toSerialize["map"] = o.Map + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraPropertyId", + "map", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraPropertyId") + delete(additionalProperties, "map") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8 { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf8) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_9.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_9.go new file mode 100644 index 00000000..b065e756 --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_9.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 struct { + JiraPropertyId string `json:"jiraPropertyId"` + Map []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner `json:"map"` + Field ENUMISSUELINKINASSET `json:"field"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9(jiraPropertyId string, map_ []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, field ENUMISSUELINKINASSET) *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9{} + this.JiraPropertyId = jiraPropertyId + this.Map = map_ + this.Field = field + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9WithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9WithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9{} + return &this +} + +// GetJiraPropertyId returns the JiraPropertyId field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) GetJiraPropertyId() string { + if o == nil { + var ret string + return ret + } + + return o.JiraPropertyId +} + +// GetJiraPropertyIdOk returns a tuple with the JiraPropertyId field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) GetJiraPropertyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraPropertyId, true +} + +// SetJiraPropertyId sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) SetJiraPropertyId(v string) { + o.JiraPropertyId = v +} + +// GetMap returns the Map field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) GetMap() []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + if o == nil { + var ret []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + return ret + } + + return o.Map +} + +// GetMapOk returns a tuple with the Map field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) GetMapOk() ([]CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner, bool) { + if o == nil { + return nil, false + } + return o.Map, true +} + +// SetMap sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) SetMap(v []CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + o.Map = v +} + +// GetField returns the Field field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) GetField() ENUMISSUELINKINASSET { + if o == nil { + var ret ENUMISSUELINKINASSET + return ret + } + + return o.Field +} + +// GetFieldOk returns a tuple with the Field field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) GetFieldOk() (*ENUMISSUELINKINASSET, bool) { + if o == nil { + return nil, false + } + return &o.Field, true +} + +// SetField sets field value +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) SetField(v ENUMISSUELINKINASSET) { + o.Field = v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["jiraPropertyId"] = o.JiraPropertyId + toSerialize["map"] = o.Map + toSerialize["field"] = o.Field + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "jiraPropertyId", + "map", + "field", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "jiraPropertyId") + delete(additionalProperties, "map") + delete(additionalProperties, "field") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9 { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOf9) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_map_inner.go b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_map_inner.go new file mode 100644 index 00000000..bfac24d9 --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_jira_parameters_properties_mapping_inner_one_of_map_inner.go @@ -0,0 +1,192 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" +) + +// checks if the CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner{} + +// CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner struct for CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner +type CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner struct { + EscapeValue *string `json:"escapeValue,omitempty"` + JiraValue *string `json:"jiraValue,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner{} + return &this +} + +// NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInnerWithDefaults instantiates a new CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInnerWithDefaults() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + this := CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner{} + return &this +} + +// GetEscapeValue returns the EscapeValue field value if set, zero value otherwise. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) GetEscapeValue() string { + if o == nil || IsNil(o.EscapeValue) { + var ret string + return ret + } + return *o.EscapeValue +} + +// GetEscapeValueOk returns a tuple with the EscapeValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) GetEscapeValueOk() (*string, bool) { + if o == nil || IsNil(o.EscapeValue) { + return nil, false + } + return o.EscapeValue, true +} + +// HasEscapeValue returns a boolean if a field has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) HasEscapeValue() bool { + if o != nil && !IsNil(o.EscapeValue) { + return true + } + + return false +} + +// SetEscapeValue gets a reference to the given string and assigns it to the EscapeValue field. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) SetEscapeValue(v string) { + o.EscapeValue = &v +} + +// GetJiraValue returns the JiraValue field value if set, zero value otherwise. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) GetJiraValue() string { + if o == nil || IsNil(o.JiraValue) { + var ret string + return ret + } + return *o.JiraValue +} + +// GetJiraValueOk returns a tuple with the JiraValue field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) GetJiraValueOk() (*string, bool) { + if o == nil || IsNil(o.JiraValue) { + return nil, false + } + return o.JiraValue, true +} + +// HasJiraValue returns a boolean if a field has been set. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) HasJiraValue() bool { + if o != nil && !IsNil(o.JiraValue) { + return true + } + + return false +} + +// SetJiraValue gets a reference to the given string and assigns it to the JiraValue field. +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) SetJiraValue(v string) { + o.JiraValue = &v +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.EscapeValue) { + toSerialize["escapeValue"] = o.EscapeValue + } + if !IsNil(o.JiraValue) { + toSerialize["jiraValue"] = o.JiraValue + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) UnmarshalJSON(data []byte) (err error) { + varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner := _CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner(varCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "escapeValue") + delete(additionalProperties, "jiraValue") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner struct { + value *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) Get() *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) Set(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner(val *CreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner { + return &NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingJiraParametersPropertiesMappingInnerOneOfMapInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_webhook.go b/pkg/api/v3/model_create_export_workflow_action_using_webhook.go new file mode 100644 index 00000000..7ad087e0 --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_webhook.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingWebhook type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingWebhook{} + +// CreateExportWorkflowActionUsingWebhook struct for CreateExportWorkflowActionUsingWebhook +type CreateExportWorkflowActionUsingWebhook struct { + Type ENUMEXPORT `json:"type"` + Parameters CreateExportWorkflowActionUsingWebhookParameters `json:"parameters"` + IntegrationKind ENUMWEBHOOK `json:"integrationKind"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingWebhook CreateExportWorkflowActionUsingWebhook + +// NewCreateExportWorkflowActionUsingWebhook instantiates a new CreateExportWorkflowActionUsingWebhook object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingWebhook(type_ ENUMEXPORT, parameters CreateExportWorkflowActionUsingWebhookParameters, integrationKind ENUMWEBHOOK) *CreateExportWorkflowActionUsingWebhook { + this := CreateExportWorkflowActionUsingWebhook{} + this.Type = type_ + this.Parameters = parameters + this.IntegrationKind = integrationKind + return &this +} + +// NewCreateExportWorkflowActionUsingWebhookWithDefaults instantiates a new CreateExportWorkflowActionUsingWebhook object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingWebhookWithDefaults() *CreateExportWorkflowActionUsingWebhook { + this := CreateExportWorkflowActionUsingWebhook{} + return &this +} + +// GetType returns the Type field value +func (o *CreateExportWorkflowActionUsingWebhook) GetType() ENUMEXPORT { + if o == nil { + var ret ENUMEXPORT + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingWebhook) GetTypeOk() (*ENUMEXPORT, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *CreateExportWorkflowActionUsingWebhook) SetType(v ENUMEXPORT) { + o.Type = v +} + +// GetParameters returns the Parameters field value +func (o *CreateExportWorkflowActionUsingWebhook) GetParameters() CreateExportWorkflowActionUsingWebhookParameters { + if o == nil { + var ret CreateExportWorkflowActionUsingWebhookParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingWebhook) GetParametersOk() (*CreateExportWorkflowActionUsingWebhookParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreateExportWorkflowActionUsingWebhook) SetParameters(v CreateExportWorkflowActionUsingWebhookParameters) { + o.Parameters = v +} + +// GetIntegrationKind returns the IntegrationKind field value +func (o *CreateExportWorkflowActionUsingWebhook) GetIntegrationKind() ENUMWEBHOOK { + if o == nil { + var ret ENUMWEBHOOK + return ret + } + + return o.IntegrationKind +} + +// GetIntegrationKindOk returns a tuple with the IntegrationKind field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingWebhook) GetIntegrationKindOk() (*ENUMWEBHOOK, bool) { + if o == nil { + return nil, false + } + return &o.IntegrationKind, true +} + +// SetIntegrationKind sets field value +func (o *CreateExportWorkflowActionUsingWebhook) SetIntegrationKind(v ENUMWEBHOOK) { + o.IntegrationKind = v +} + +func (o CreateExportWorkflowActionUsingWebhook) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingWebhook) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["parameters"] = o.Parameters + toSerialize["integrationKind"] = o.IntegrationKind + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingWebhook) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "parameters", + "integrationKind", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingWebhook := _CreateExportWorkflowActionUsingWebhook{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingWebhook) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingWebhook(varCreateExportWorkflowActionUsingWebhook) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "parameters") + delete(additionalProperties, "integrationKind") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingWebhook struct { + value *CreateExportWorkflowActionUsingWebhook + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingWebhook) Get() *CreateExportWorkflowActionUsingWebhook { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingWebhook) Set(val *CreateExportWorkflowActionUsingWebhook) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingWebhook) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingWebhook) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingWebhook(val *CreateExportWorkflowActionUsingWebhook) *NullableCreateExportWorkflowActionUsingWebhook { + return &NullableCreateExportWorkflowActionUsingWebhook{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingWebhook) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingWebhook) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_webhook_parameters.go b/pkg/api/v3/model_create_export_workflow_action_using_webhook_parameters.go new file mode 100644 index 00000000..d7226dfe --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_webhook_parameters.go @@ -0,0 +1,197 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingWebhookParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingWebhookParameters{} + +// CreateExportWorkflowActionUsingWebhookParameters struct for CreateExportWorkflowActionUsingWebhookParameters +type CreateExportWorkflowActionUsingWebhookParameters struct { + Url string `json:"url"` + Format ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT `json:"format"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingWebhookParameters CreateExportWorkflowActionUsingWebhookParameters + +// NewCreateExportWorkflowActionUsingWebhookParameters instantiates a new CreateExportWorkflowActionUsingWebhookParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingWebhookParameters(url string, format ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT) *CreateExportWorkflowActionUsingWebhookParameters { + this := CreateExportWorkflowActionUsingWebhookParameters{} + this.Url = url + this.Format = format + return &this +} + +// NewCreateExportWorkflowActionUsingWebhookParametersWithDefaults instantiates a new CreateExportWorkflowActionUsingWebhookParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingWebhookParametersWithDefaults() *CreateExportWorkflowActionUsingWebhookParameters { + this := CreateExportWorkflowActionUsingWebhookParameters{} + return &this +} + +// GetUrl returns the Url field value +func (o *CreateExportWorkflowActionUsingWebhookParameters) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingWebhookParameters) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *CreateExportWorkflowActionUsingWebhookParameters) SetUrl(v string) { + o.Url = v +} + +// GetFormat returns the Format field value +func (o *CreateExportWorkflowActionUsingWebhookParameters) GetFormat() ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT { + if o == nil { + var ret ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT + return ret + } + + return o.Format +} + +// GetFormatOk returns a tuple with the Format field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingWebhookParameters) GetFormatOk() (*ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT, bool) { + if o == nil { + return nil, false + } + return &o.Format, true +} + +// SetFormat sets field value +func (o *CreateExportWorkflowActionUsingWebhookParameters) SetFormat(v ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT) { + o.Format = v +} + +func (o CreateExportWorkflowActionUsingWebhookParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingWebhookParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["url"] = o.Url + toSerialize["format"] = o.Format + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingWebhookParameters) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "url", + "format", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingWebhookParameters := _CreateExportWorkflowActionUsingWebhookParameters{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingWebhookParameters) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingWebhookParameters(varCreateExportWorkflowActionUsingWebhookParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "url") + delete(additionalProperties, "format") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingWebhookParameters struct { + value *CreateExportWorkflowActionUsingWebhookParameters + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingWebhookParameters) Get() *CreateExportWorkflowActionUsingWebhookParameters { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingWebhookParameters) Set(val *CreateExportWorkflowActionUsingWebhookParameters) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingWebhookParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingWebhookParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingWebhookParameters(val *CreateExportWorkflowActionUsingWebhookParameters) *NullableCreateExportWorkflowActionUsingWebhookParameters { + return &NullableCreateExportWorkflowActionUsingWebhookParameters{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingWebhookParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingWebhookParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_wiz.go b/pkg/api/v3/model_create_export_workflow_action_using_wiz.go new file mode 100644 index 00000000..a89baf37 --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_wiz.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateExportWorkflowActionUsingWiz type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingWiz{} + +// CreateExportWorkflowActionUsingWiz struct for CreateExportWorkflowActionUsingWiz +type CreateExportWorkflowActionUsingWiz struct { + Type ENUMEXPORT `json:"type"` + Parameters CreateExportWorkflowActionUsingWizParameters `json:"parameters"` + IntegrationKind ENUMWIZ `json:"integrationKind"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingWiz CreateExportWorkflowActionUsingWiz + +// NewCreateExportWorkflowActionUsingWiz instantiates a new CreateExportWorkflowActionUsingWiz object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingWiz(type_ ENUMEXPORT, parameters CreateExportWorkflowActionUsingWizParameters, integrationKind ENUMWIZ) *CreateExportWorkflowActionUsingWiz { + this := CreateExportWorkflowActionUsingWiz{} + this.Type = type_ + this.Parameters = parameters + this.IntegrationKind = integrationKind + return &this +} + +// NewCreateExportWorkflowActionUsingWizWithDefaults instantiates a new CreateExportWorkflowActionUsingWiz object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingWizWithDefaults() *CreateExportWorkflowActionUsingWiz { + this := CreateExportWorkflowActionUsingWiz{} + return &this +} + +// GetType returns the Type field value +func (o *CreateExportWorkflowActionUsingWiz) GetType() ENUMEXPORT { + if o == nil { + var ret ENUMEXPORT + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingWiz) GetTypeOk() (*ENUMEXPORT, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *CreateExportWorkflowActionUsingWiz) SetType(v ENUMEXPORT) { + o.Type = v +} + +// GetParameters returns the Parameters field value +func (o *CreateExportWorkflowActionUsingWiz) GetParameters() CreateExportWorkflowActionUsingWizParameters { + if o == nil { + var ret CreateExportWorkflowActionUsingWizParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingWiz) GetParametersOk() (*CreateExportWorkflowActionUsingWizParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreateExportWorkflowActionUsingWiz) SetParameters(v CreateExportWorkflowActionUsingWizParameters) { + o.Parameters = v +} + +// GetIntegrationKind returns the IntegrationKind field value +func (o *CreateExportWorkflowActionUsingWiz) GetIntegrationKind() ENUMWIZ { + if o == nil { + var ret ENUMWIZ + return ret + } + + return o.IntegrationKind +} + +// GetIntegrationKindOk returns a tuple with the IntegrationKind field value +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingWiz) GetIntegrationKindOk() (*ENUMWIZ, bool) { + if o == nil { + return nil, false + } + return &o.IntegrationKind, true +} + +// SetIntegrationKind sets field value +func (o *CreateExportWorkflowActionUsingWiz) SetIntegrationKind(v ENUMWIZ) { + o.IntegrationKind = v +} + +func (o CreateExportWorkflowActionUsingWiz) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingWiz) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["parameters"] = o.Parameters + toSerialize["integrationKind"] = o.IntegrationKind + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingWiz) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "parameters", + "integrationKind", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateExportWorkflowActionUsingWiz := _CreateExportWorkflowActionUsingWiz{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingWiz) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingWiz(varCreateExportWorkflowActionUsingWiz) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "parameters") + delete(additionalProperties, "integrationKind") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingWiz struct { + value *CreateExportWorkflowActionUsingWiz + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingWiz) Get() *CreateExportWorkflowActionUsingWiz { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingWiz) Set(val *CreateExportWorkflowActionUsingWiz) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingWiz) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingWiz) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingWiz(val *CreateExportWorkflowActionUsingWiz) *NullableCreateExportWorkflowActionUsingWiz { + return &NullableCreateExportWorkflowActionUsingWiz{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingWiz) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingWiz) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_export_workflow_action_using_wiz_parameters.go b/pkg/api/v3/model_create_export_workflow_action_using_wiz_parameters.go new file mode 100644 index 00000000..4bfd70a3 --- /dev/null +++ b/pkg/api/v3/model_create_export_workflow_action_using_wiz_parameters.go @@ -0,0 +1,155 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" +) + +// checks if the CreateExportWorkflowActionUsingWizParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateExportWorkflowActionUsingWizParameters{} + +// CreateExportWorkflowActionUsingWizParameters struct for CreateExportWorkflowActionUsingWizParameters +type CreateExportWorkflowActionUsingWizParameters struct { + MinSeverity *ENUMPROPERTIESDATAITEMSPROPERTIESSEVERITY `json:"minSeverity,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateExportWorkflowActionUsingWizParameters CreateExportWorkflowActionUsingWizParameters + +// NewCreateExportWorkflowActionUsingWizParameters instantiates a new CreateExportWorkflowActionUsingWizParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateExportWorkflowActionUsingWizParameters() *CreateExportWorkflowActionUsingWizParameters { + this := CreateExportWorkflowActionUsingWizParameters{} + return &this +} + +// NewCreateExportWorkflowActionUsingWizParametersWithDefaults instantiates a new CreateExportWorkflowActionUsingWizParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateExportWorkflowActionUsingWizParametersWithDefaults() *CreateExportWorkflowActionUsingWizParameters { + this := CreateExportWorkflowActionUsingWizParameters{} + return &this +} + +// GetMinSeverity returns the MinSeverity field value if set, zero value otherwise. +func (o *CreateExportWorkflowActionUsingWizParameters) GetMinSeverity() ENUMPROPERTIESDATAITEMSPROPERTIESSEVERITY { + if o == nil || IsNil(o.MinSeverity) { + var ret ENUMPROPERTIESDATAITEMSPROPERTIESSEVERITY + return ret + } + return *o.MinSeverity +} + +// GetMinSeverityOk returns a tuple with the MinSeverity field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateExportWorkflowActionUsingWizParameters) GetMinSeverityOk() (*ENUMPROPERTIESDATAITEMSPROPERTIESSEVERITY, bool) { + if o == nil || IsNil(o.MinSeverity) { + return nil, false + } + return o.MinSeverity, true +} + +// HasMinSeverity returns a boolean if a field has been set. +func (o *CreateExportWorkflowActionUsingWizParameters) HasMinSeverity() bool { + if o != nil && !IsNil(o.MinSeverity) { + return true + } + + return false +} + +// SetMinSeverity gets a reference to the given ENUMPROPERTIESDATAITEMSPROPERTIESSEVERITY and assigns it to the MinSeverity field. +func (o *CreateExportWorkflowActionUsingWizParameters) SetMinSeverity(v ENUMPROPERTIESDATAITEMSPROPERTIESSEVERITY) { + o.MinSeverity = &v +} + +func (o CreateExportWorkflowActionUsingWizParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateExportWorkflowActionUsingWizParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.MinSeverity) { + toSerialize["minSeverity"] = o.MinSeverity + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateExportWorkflowActionUsingWizParameters) UnmarshalJSON(data []byte) (err error) { + varCreateExportWorkflowActionUsingWizParameters := _CreateExportWorkflowActionUsingWizParameters{} + + err = json.Unmarshal(data, &varCreateExportWorkflowActionUsingWizParameters) + + if err != nil { + return err + } + + *o = CreateExportWorkflowActionUsingWizParameters(varCreateExportWorkflowActionUsingWizParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "minSeverity") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateExportWorkflowActionUsingWizParameters struct { + value *CreateExportWorkflowActionUsingWizParameters + isSet bool +} + +func (v NullableCreateExportWorkflowActionUsingWizParameters) Get() *CreateExportWorkflowActionUsingWizParameters { + return v.value +} + +func (v *NullableCreateExportWorkflowActionUsingWizParameters) Set(val *CreateExportWorkflowActionUsingWizParameters) { + v.value = val + v.isSet = true +} + +func (v NullableCreateExportWorkflowActionUsingWizParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateExportWorkflowActionUsingWizParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateExportWorkflowActionUsingWizParameters(val *CreateExportWorkflowActionUsingWizParameters) *NullableCreateExportWorkflowActionUsingWizParameters { + return &NullableCreateExportWorkflowActionUsingWizParameters{value: val, isSet: true} +} + +func (v NullableCreateExportWorkflowActionUsingWizParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateExportWorkflowActionUsingWizParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_notify_workflow_action_using_discord.go b/pkg/api/v3/model_create_notify_workflow_action_using_discord.go new file mode 100644 index 00000000..ab8d97a6 --- /dev/null +++ b/pkg/api/v3/model_create_notify_workflow_action_using_discord.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateNotifyWorkflowActionUsingDiscord type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateNotifyWorkflowActionUsingDiscord{} + +// CreateNotifyWorkflowActionUsingDiscord struct for CreateNotifyWorkflowActionUsingDiscord +type CreateNotifyWorkflowActionUsingDiscord struct { + Type ENUMNOTIFY `json:"type"` + Parameters CreateNotifyWorkflowActionUsingSlackParameters `json:"parameters"` + IntegrationKind ENUMDISCORDWEBHOOK `json:"integrationKind"` + AdditionalProperties map[string]interface{} +} + +type _CreateNotifyWorkflowActionUsingDiscord CreateNotifyWorkflowActionUsingDiscord + +// NewCreateNotifyWorkflowActionUsingDiscord instantiates a new CreateNotifyWorkflowActionUsingDiscord object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateNotifyWorkflowActionUsingDiscord(type_ ENUMNOTIFY, parameters CreateNotifyWorkflowActionUsingSlackParameters, integrationKind ENUMDISCORDWEBHOOK) *CreateNotifyWorkflowActionUsingDiscord { + this := CreateNotifyWorkflowActionUsingDiscord{} + this.Type = type_ + this.Parameters = parameters + this.IntegrationKind = integrationKind + return &this +} + +// NewCreateNotifyWorkflowActionUsingDiscordWithDefaults instantiates a new CreateNotifyWorkflowActionUsingDiscord object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateNotifyWorkflowActionUsingDiscordWithDefaults() *CreateNotifyWorkflowActionUsingDiscord { + this := CreateNotifyWorkflowActionUsingDiscord{} + return &this +} + +// GetType returns the Type field value +func (o *CreateNotifyWorkflowActionUsingDiscord) GetType() ENUMNOTIFY { + if o == nil { + var ret ENUMNOTIFY + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CreateNotifyWorkflowActionUsingDiscord) GetTypeOk() (*ENUMNOTIFY, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *CreateNotifyWorkflowActionUsingDiscord) SetType(v ENUMNOTIFY) { + o.Type = v +} + +// GetParameters returns the Parameters field value +func (o *CreateNotifyWorkflowActionUsingDiscord) GetParameters() CreateNotifyWorkflowActionUsingSlackParameters { + if o == nil { + var ret CreateNotifyWorkflowActionUsingSlackParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreateNotifyWorkflowActionUsingDiscord) GetParametersOk() (*CreateNotifyWorkflowActionUsingSlackParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreateNotifyWorkflowActionUsingDiscord) SetParameters(v CreateNotifyWorkflowActionUsingSlackParameters) { + o.Parameters = v +} + +// GetIntegrationKind returns the IntegrationKind field value +func (o *CreateNotifyWorkflowActionUsingDiscord) GetIntegrationKind() ENUMDISCORDWEBHOOK { + if o == nil { + var ret ENUMDISCORDWEBHOOK + return ret + } + + return o.IntegrationKind +} + +// GetIntegrationKindOk returns a tuple with the IntegrationKind field value +// and a boolean to check if the value has been set. +func (o *CreateNotifyWorkflowActionUsingDiscord) GetIntegrationKindOk() (*ENUMDISCORDWEBHOOK, bool) { + if o == nil { + return nil, false + } + return &o.IntegrationKind, true +} + +// SetIntegrationKind sets field value +func (o *CreateNotifyWorkflowActionUsingDiscord) SetIntegrationKind(v ENUMDISCORDWEBHOOK) { + o.IntegrationKind = v +} + +func (o CreateNotifyWorkflowActionUsingDiscord) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateNotifyWorkflowActionUsingDiscord) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["parameters"] = o.Parameters + toSerialize["integrationKind"] = o.IntegrationKind + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateNotifyWorkflowActionUsingDiscord) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "parameters", + "integrationKind", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateNotifyWorkflowActionUsingDiscord := _CreateNotifyWorkflowActionUsingDiscord{} + + err = json.Unmarshal(data, &varCreateNotifyWorkflowActionUsingDiscord) + + if err != nil { + return err + } + + *o = CreateNotifyWorkflowActionUsingDiscord(varCreateNotifyWorkflowActionUsingDiscord) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "parameters") + delete(additionalProperties, "integrationKind") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateNotifyWorkflowActionUsingDiscord struct { + value *CreateNotifyWorkflowActionUsingDiscord + isSet bool +} + +func (v NullableCreateNotifyWorkflowActionUsingDiscord) Get() *CreateNotifyWorkflowActionUsingDiscord { + return v.value +} + +func (v *NullableCreateNotifyWorkflowActionUsingDiscord) Set(val *CreateNotifyWorkflowActionUsingDiscord) { + v.value = val + v.isSet = true +} + +func (v NullableCreateNotifyWorkflowActionUsingDiscord) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateNotifyWorkflowActionUsingDiscord) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateNotifyWorkflowActionUsingDiscord(val *CreateNotifyWorkflowActionUsingDiscord) *NullableCreateNotifyWorkflowActionUsingDiscord { + return &NullableCreateNotifyWorkflowActionUsingDiscord{value: val, isSet: true} +} + +func (v NullableCreateNotifyWorkflowActionUsingDiscord) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateNotifyWorkflowActionUsingDiscord) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_notify_workflow_action_using_email.go b/pkg/api/v3/model_create_notify_workflow_action_using_email.go new file mode 100644 index 00000000..b17852cb --- /dev/null +++ b/pkg/api/v3/model_create_notify_workflow_action_using_email.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateNotifyWorkflowActionUsingEmail type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateNotifyWorkflowActionUsingEmail{} + +// CreateNotifyWorkflowActionUsingEmail struct for CreateNotifyWorkflowActionUsingEmail +type CreateNotifyWorkflowActionUsingEmail struct { + Type ENUMNOTIFY `json:"type"` + Parameters CreateNotifyWorkflowActionUsingEmailParameters `json:"parameters"` + IntegrationKind ENUMEMAIL `json:"integrationKind"` + AdditionalProperties map[string]interface{} +} + +type _CreateNotifyWorkflowActionUsingEmail CreateNotifyWorkflowActionUsingEmail + +// NewCreateNotifyWorkflowActionUsingEmail instantiates a new CreateNotifyWorkflowActionUsingEmail object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateNotifyWorkflowActionUsingEmail(type_ ENUMNOTIFY, parameters CreateNotifyWorkflowActionUsingEmailParameters, integrationKind ENUMEMAIL) *CreateNotifyWorkflowActionUsingEmail { + this := CreateNotifyWorkflowActionUsingEmail{} + this.Type = type_ + this.Parameters = parameters + this.IntegrationKind = integrationKind + return &this +} + +// NewCreateNotifyWorkflowActionUsingEmailWithDefaults instantiates a new CreateNotifyWorkflowActionUsingEmail object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateNotifyWorkflowActionUsingEmailWithDefaults() *CreateNotifyWorkflowActionUsingEmail { + this := CreateNotifyWorkflowActionUsingEmail{} + return &this +} + +// GetType returns the Type field value +func (o *CreateNotifyWorkflowActionUsingEmail) GetType() ENUMNOTIFY { + if o == nil { + var ret ENUMNOTIFY + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CreateNotifyWorkflowActionUsingEmail) GetTypeOk() (*ENUMNOTIFY, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *CreateNotifyWorkflowActionUsingEmail) SetType(v ENUMNOTIFY) { + o.Type = v +} + +// GetParameters returns the Parameters field value +func (o *CreateNotifyWorkflowActionUsingEmail) GetParameters() CreateNotifyWorkflowActionUsingEmailParameters { + if o == nil { + var ret CreateNotifyWorkflowActionUsingEmailParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreateNotifyWorkflowActionUsingEmail) GetParametersOk() (*CreateNotifyWorkflowActionUsingEmailParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreateNotifyWorkflowActionUsingEmail) SetParameters(v CreateNotifyWorkflowActionUsingEmailParameters) { + o.Parameters = v +} + +// GetIntegrationKind returns the IntegrationKind field value +func (o *CreateNotifyWorkflowActionUsingEmail) GetIntegrationKind() ENUMEMAIL { + if o == nil { + var ret ENUMEMAIL + return ret + } + + return o.IntegrationKind +} + +// GetIntegrationKindOk returns a tuple with the IntegrationKind field value +// and a boolean to check if the value has been set. +func (o *CreateNotifyWorkflowActionUsingEmail) GetIntegrationKindOk() (*ENUMEMAIL, bool) { + if o == nil { + return nil, false + } + return &o.IntegrationKind, true +} + +// SetIntegrationKind sets field value +func (o *CreateNotifyWorkflowActionUsingEmail) SetIntegrationKind(v ENUMEMAIL) { + o.IntegrationKind = v +} + +func (o CreateNotifyWorkflowActionUsingEmail) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateNotifyWorkflowActionUsingEmail) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["parameters"] = o.Parameters + toSerialize["integrationKind"] = o.IntegrationKind + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateNotifyWorkflowActionUsingEmail) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "parameters", + "integrationKind", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateNotifyWorkflowActionUsingEmail := _CreateNotifyWorkflowActionUsingEmail{} + + err = json.Unmarshal(data, &varCreateNotifyWorkflowActionUsingEmail) + + if err != nil { + return err + } + + *o = CreateNotifyWorkflowActionUsingEmail(varCreateNotifyWorkflowActionUsingEmail) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "parameters") + delete(additionalProperties, "integrationKind") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateNotifyWorkflowActionUsingEmail struct { + value *CreateNotifyWorkflowActionUsingEmail + isSet bool +} + +func (v NullableCreateNotifyWorkflowActionUsingEmail) Get() *CreateNotifyWorkflowActionUsingEmail { + return v.value +} + +func (v *NullableCreateNotifyWorkflowActionUsingEmail) Set(val *CreateNotifyWorkflowActionUsingEmail) { + v.value = val + v.isSet = true +} + +func (v NullableCreateNotifyWorkflowActionUsingEmail) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateNotifyWorkflowActionUsingEmail) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateNotifyWorkflowActionUsingEmail(val *CreateNotifyWorkflowActionUsingEmail) *NullableCreateNotifyWorkflowActionUsingEmail { + return &NullableCreateNotifyWorkflowActionUsingEmail{value: val, isSet: true} +} + +func (v NullableCreateNotifyWorkflowActionUsingEmail) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateNotifyWorkflowActionUsingEmail) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_notify_workflow_action_using_email_parameters.go b/pkg/api/v3/model_create_notify_workflow_action_using_email_parameters.go new file mode 100644 index 00000000..b916f9bd --- /dev/null +++ b/pkg/api/v3/model_create_notify_workflow_action_using_email_parameters.go @@ -0,0 +1,168 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateNotifyWorkflowActionUsingEmailParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateNotifyWorkflowActionUsingEmailParameters{} + +// CreateNotifyWorkflowActionUsingEmailParameters struct for CreateNotifyWorkflowActionUsingEmailParameters +type CreateNotifyWorkflowActionUsingEmailParameters struct { + To CreateNotifyWorkflowActionUsingEmailParametersTo `json:"to"` + AdditionalProperties map[string]interface{} +} + +type _CreateNotifyWorkflowActionUsingEmailParameters CreateNotifyWorkflowActionUsingEmailParameters + +// NewCreateNotifyWorkflowActionUsingEmailParameters instantiates a new CreateNotifyWorkflowActionUsingEmailParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateNotifyWorkflowActionUsingEmailParameters(to CreateNotifyWorkflowActionUsingEmailParametersTo) *CreateNotifyWorkflowActionUsingEmailParameters { + this := CreateNotifyWorkflowActionUsingEmailParameters{} + this.To = to + return &this +} + +// NewCreateNotifyWorkflowActionUsingEmailParametersWithDefaults instantiates a new CreateNotifyWorkflowActionUsingEmailParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateNotifyWorkflowActionUsingEmailParametersWithDefaults() *CreateNotifyWorkflowActionUsingEmailParameters { + this := CreateNotifyWorkflowActionUsingEmailParameters{} + return &this +} + +// GetTo returns the To field value +func (o *CreateNotifyWorkflowActionUsingEmailParameters) GetTo() CreateNotifyWorkflowActionUsingEmailParametersTo { + if o == nil { + var ret CreateNotifyWorkflowActionUsingEmailParametersTo + return ret + } + + return o.To +} + +// GetToOk returns a tuple with the To field value +// and a boolean to check if the value has been set. +func (o *CreateNotifyWorkflowActionUsingEmailParameters) GetToOk() (*CreateNotifyWorkflowActionUsingEmailParametersTo, bool) { + if o == nil { + return nil, false + } + return &o.To, true +} + +// SetTo sets field value +func (o *CreateNotifyWorkflowActionUsingEmailParameters) SetTo(v CreateNotifyWorkflowActionUsingEmailParametersTo) { + o.To = v +} + +func (o CreateNotifyWorkflowActionUsingEmailParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateNotifyWorkflowActionUsingEmailParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["to"] = o.To + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateNotifyWorkflowActionUsingEmailParameters) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "to", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateNotifyWorkflowActionUsingEmailParameters := _CreateNotifyWorkflowActionUsingEmailParameters{} + + err = json.Unmarshal(data, &varCreateNotifyWorkflowActionUsingEmailParameters) + + if err != nil { + return err + } + + *o = CreateNotifyWorkflowActionUsingEmailParameters(varCreateNotifyWorkflowActionUsingEmailParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "to") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateNotifyWorkflowActionUsingEmailParameters struct { + value *CreateNotifyWorkflowActionUsingEmailParameters + isSet bool +} + +func (v NullableCreateNotifyWorkflowActionUsingEmailParameters) Get() *CreateNotifyWorkflowActionUsingEmailParameters { + return v.value +} + +func (v *NullableCreateNotifyWorkflowActionUsingEmailParameters) Set(val *CreateNotifyWorkflowActionUsingEmailParameters) { + v.value = val + v.isSet = true +} + +func (v NullableCreateNotifyWorkflowActionUsingEmailParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateNotifyWorkflowActionUsingEmailParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateNotifyWorkflowActionUsingEmailParameters(val *CreateNotifyWorkflowActionUsingEmailParameters) *NullableCreateNotifyWorkflowActionUsingEmailParameters { + return &NullableCreateNotifyWorkflowActionUsingEmailParameters{value: val, isSet: true} +} + +func (v NullableCreateNotifyWorkflowActionUsingEmailParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateNotifyWorkflowActionUsingEmailParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_notify_workflow_action_using_email_parameters_to.go b/pkg/api/v3/model_create_notify_workflow_action_using_email_parameters_to.go new file mode 100644 index 00000000..02a4766c --- /dev/null +++ b/pkg/api/v3/model_create_notify_workflow_action_using_email_parameters_to.go @@ -0,0 +1,209 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" + "gopkg.in/validator.v2" +) + +// CreateNotifyWorkflowActionUsingEmailParametersTo - struct for CreateNotifyWorkflowActionUsingEmailParametersTo +type CreateNotifyWorkflowActionUsingEmailParametersTo struct { + CreateNotifyWorkflowActionUsingEmailParametersToOneOf *CreateNotifyWorkflowActionUsingEmailParametersToOneOf + CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 *CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 + CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 *CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 +} + +// CreateNotifyWorkflowActionUsingEmailParametersToOneOfAsCreateNotifyWorkflowActionUsingEmailParametersTo is a convenience function that returns CreateNotifyWorkflowActionUsingEmailParametersToOneOf wrapped in CreateNotifyWorkflowActionUsingEmailParametersTo +func CreateNotifyWorkflowActionUsingEmailParametersToOneOfAsCreateNotifyWorkflowActionUsingEmailParametersTo(v *CreateNotifyWorkflowActionUsingEmailParametersToOneOf) CreateNotifyWorkflowActionUsingEmailParametersTo { + return CreateNotifyWorkflowActionUsingEmailParametersTo{ + CreateNotifyWorkflowActionUsingEmailParametersToOneOf: v, + } +} + +// CreateNotifyWorkflowActionUsingEmailParametersToOneOf1AsCreateNotifyWorkflowActionUsingEmailParametersTo is a convenience function that returns CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 wrapped in CreateNotifyWorkflowActionUsingEmailParametersTo +func CreateNotifyWorkflowActionUsingEmailParametersToOneOf1AsCreateNotifyWorkflowActionUsingEmailParametersTo(v *CreateNotifyWorkflowActionUsingEmailParametersToOneOf1) CreateNotifyWorkflowActionUsingEmailParametersTo { + return CreateNotifyWorkflowActionUsingEmailParametersTo{ + CreateNotifyWorkflowActionUsingEmailParametersToOneOf1: v, + } +} + +// CreateNotifyWorkflowActionUsingEmailParametersToOneOf2AsCreateNotifyWorkflowActionUsingEmailParametersTo is a convenience function that returns CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 wrapped in CreateNotifyWorkflowActionUsingEmailParametersTo +func CreateNotifyWorkflowActionUsingEmailParametersToOneOf2AsCreateNotifyWorkflowActionUsingEmailParametersTo(v *CreateNotifyWorkflowActionUsingEmailParametersToOneOf2) CreateNotifyWorkflowActionUsingEmailParametersTo { + return CreateNotifyWorkflowActionUsingEmailParametersTo{ + CreateNotifyWorkflowActionUsingEmailParametersToOneOf2: v, + } +} + + +// Unmarshal JSON data into one of the pointers in the struct +func (dst *CreateNotifyWorkflowActionUsingEmailParametersTo) UnmarshalJSON(data []byte) error { + var err error + match := 0 + // try to unmarshal data into CreateNotifyWorkflowActionUsingEmailParametersToOneOf + err = newStrictDecoder(data).Decode(&dst.CreateNotifyWorkflowActionUsingEmailParametersToOneOf) + if err == nil { + jsonCreateNotifyWorkflowActionUsingEmailParametersToOneOf, _ := json.Marshal(dst.CreateNotifyWorkflowActionUsingEmailParametersToOneOf) + if string(jsonCreateNotifyWorkflowActionUsingEmailParametersToOneOf) == "{}" { // empty struct + dst.CreateNotifyWorkflowActionUsingEmailParametersToOneOf = nil + } else { + if err = validator.Validate(dst.CreateNotifyWorkflowActionUsingEmailParametersToOneOf); err != nil { + dst.CreateNotifyWorkflowActionUsingEmailParametersToOneOf = nil + } else { + match++ + } + } + } else { + dst.CreateNotifyWorkflowActionUsingEmailParametersToOneOf = nil + } + + // try to unmarshal data into CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 + err = newStrictDecoder(data).Decode(&dst.CreateNotifyWorkflowActionUsingEmailParametersToOneOf1) + if err == nil { + jsonCreateNotifyWorkflowActionUsingEmailParametersToOneOf1, _ := json.Marshal(dst.CreateNotifyWorkflowActionUsingEmailParametersToOneOf1) + if string(jsonCreateNotifyWorkflowActionUsingEmailParametersToOneOf1) == "{}" { // empty struct + dst.CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 = nil + } else { + if err = validator.Validate(dst.CreateNotifyWorkflowActionUsingEmailParametersToOneOf1); err != nil { + dst.CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 = nil + } else { + match++ + } + } + } else { + dst.CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 = nil + } + + // try to unmarshal data into CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 + err = newStrictDecoder(data).Decode(&dst.CreateNotifyWorkflowActionUsingEmailParametersToOneOf2) + if err == nil { + jsonCreateNotifyWorkflowActionUsingEmailParametersToOneOf2, _ := json.Marshal(dst.CreateNotifyWorkflowActionUsingEmailParametersToOneOf2) + if string(jsonCreateNotifyWorkflowActionUsingEmailParametersToOneOf2) == "{}" { // empty struct + dst.CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 = nil + } else { + if err = validator.Validate(dst.CreateNotifyWorkflowActionUsingEmailParametersToOneOf2); err != nil { + dst.CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 = nil + } else { + match++ + } + } + } else { + dst.CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 = nil + } + + if match > 1 { // more than 1 match + // reset to nil + dst.CreateNotifyWorkflowActionUsingEmailParametersToOneOf = nil + dst.CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 = nil + dst.CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 = nil + + return fmt.Errorf("data matches more than one schema in oneOf(CreateNotifyWorkflowActionUsingEmailParametersTo)") + } else if match == 1 { + return nil // exactly one match + } else { // no match + return fmt.Errorf("data failed to match schemas in oneOf(CreateNotifyWorkflowActionUsingEmailParametersTo)") + } +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src CreateNotifyWorkflowActionUsingEmailParametersTo) MarshalJSON() ([]byte, error) { + if src.CreateNotifyWorkflowActionUsingEmailParametersToOneOf != nil { + return json.Marshal(&src.CreateNotifyWorkflowActionUsingEmailParametersToOneOf) + } + + if src.CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 != nil { + return json.Marshal(&src.CreateNotifyWorkflowActionUsingEmailParametersToOneOf1) + } + + if src.CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 != nil { + return json.Marshal(&src.CreateNotifyWorkflowActionUsingEmailParametersToOneOf2) + } + + return nil, nil // no data in oneOf schemas +} + +// Get the actual instance +func (obj *CreateNotifyWorkflowActionUsingEmailParametersTo) GetActualInstance() (interface{}) { + if obj == nil { + return nil + } + if obj.CreateNotifyWorkflowActionUsingEmailParametersToOneOf != nil { + return obj.CreateNotifyWorkflowActionUsingEmailParametersToOneOf + } + + if obj.CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 != nil { + return obj.CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 + } + + if obj.CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 != nil { + return obj.CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 + } + + // all schemas are nil + return nil +} + +// Get the actual instance value +func (obj CreateNotifyWorkflowActionUsingEmailParametersTo) GetActualInstanceValue() (interface{}) { + if obj.CreateNotifyWorkflowActionUsingEmailParametersToOneOf != nil { + return *obj.CreateNotifyWorkflowActionUsingEmailParametersToOneOf + } + + if obj.CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 != nil { + return *obj.CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 + } + + if obj.CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 != nil { + return *obj.CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 + } + + // all schemas are nil + return nil +} + +type NullableCreateNotifyWorkflowActionUsingEmailParametersTo struct { + value *CreateNotifyWorkflowActionUsingEmailParametersTo + isSet bool +} + +func (v NullableCreateNotifyWorkflowActionUsingEmailParametersTo) Get() *CreateNotifyWorkflowActionUsingEmailParametersTo { + return v.value +} + +func (v *NullableCreateNotifyWorkflowActionUsingEmailParametersTo) Set(val *CreateNotifyWorkflowActionUsingEmailParametersTo) { + v.value = val + v.isSet = true +} + +func (v NullableCreateNotifyWorkflowActionUsingEmailParametersTo) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateNotifyWorkflowActionUsingEmailParametersTo) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateNotifyWorkflowActionUsingEmailParametersTo(val *CreateNotifyWorkflowActionUsingEmailParametersTo) *NullableCreateNotifyWorkflowActionUsingEmailParametersTo { + return &NullableCreateNotifyWorkflowActionUsingEmailParametersTo{value: val, isSet: true} +} + +func (v NullableCreateNotifyWorkflowActionUsingEmailParametersTo) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateNotifyWorkflowActionUsingEmailParametersTo) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_notify_workflow_action_using_email_parameters_to_one_of.go b/pkg/api/v3/model_create_notify_workflow_action_using_email_parameters_to_one_of.go new file mode 100644 index 00000000..2874fe62 --- /dev/null +++ b/pkg/api/v3/model_create_notify_workflow_action_using_email_parameters_to_one_of.go @@ -0,0 +1,197 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateNotifyWorkflowActionUsingEmailParametersToOneOf type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateNotifyWorkflowActionUsingEmailParametersToOneOf{} + +// CreateNotifyWorkflowActionUsingEmailParametersToOneOf struct for CreateNotifyWorkflowActionUsingEmailParametersToOneOf +type CreateNotifyWorkflowActionUsingEmailParametersToOneOf struct { + Type ENUMEMAILS `json:"type"` + Emails []string `json:"emails"` + AdditionalProperties map[string]interface{} +} + +type _CreateNotifyWorkflowActionUsingEmailParametersToOneOf CreateNotifyWorkflowActionUsingEmailParametersToOneOf + +// NewCreateNotifyWorkflowActionUsingEmailParametersToOneOf instantiates a new CreateNotifyWorkflowActionUsingEmailParametersToOneOf object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateNotifyWorkflowActionUsingEmailParametersToOneOf(type_ ENUMEMAILS, emails []string) *CreateNotifyWorkflowActionUsingEmailParametersToOneOf { + this := CreateNotifyWorkflowActionUsingEmailParametersToOneOf{} + this.Type = type_ + this.Emails = emails + return &this +} + +// NewCreateNotifyWorkflowActionUsingEmailParametersToOneOfWithDefaults instantiates a new CreateNotifyWorkflowActionUsingEmailParametersToOneOf object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateNotifyWorkflowActionUsingEmailParametersToOneOfWithDefaults() *CreateNotifyWorkflowActionUsingEmailParametersToOneOf { + this := CreateNotifyWorkflowActionUsingEmailParametersToOneOf{} + return &this +} + +// GetType returns the Type field value +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf) GetType() ENUMEMAILS { + if o == nil { + var ret ENUMEMAILS + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf) GetTypeOk() (*ENUMEMAILS, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf) SetType(v ENUMEMAILS) { + o.Type = v +} + +// GetEmails returns the Emails field value +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf) GetEmails() []string { + if o == nil { + var ret []string + return ret + } + + return o.Emails +} + +// GetEmailsOk returns a tuple with the Emails field value +// and a boolean to check if the value has been set. +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf) GetEmailsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Emails, true +} + +// SetEmails sets field value +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf) SetEmails(v []string) { + o.Emails = v +} + +func (o CreateNotifyWorkflowActionUsingEmailParametersToOneOf) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateNotifyWorkflowActionUsingEmailParametersToOneOf) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["emails"] = o.Emails + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "emails", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateNotifyWorkflowActionUsingEmailParametersToOneOf := _CreateNotifyWorkflowActionUsingEmailParametersToOneOf{} + + err = json.Unmarshal(data, &varCreateNotifyWorkflowActionUsingEmailParametersToOneOf) + + if err != nil { + return err + } + + *o = CreateNotifyWorkflowActionUsingEmailParametersToOneOf(varCreateNotifyWorkflowActionUsingEmailParametersToOneOf) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "emails") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf struct { + value *CreateNotifyWorkflowActionUsingEmailParametersToOneOf + isSet bool +} + +func (v NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf) Get() *CreateNotifyWorkflowActionUsingEmailParametersToOneOf { + return v.value +} + +func (v *NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf) Set(val *CreateNotifyWorkflowActionUsingEmailParametersToOneOf) { + v.value = val + v.isSet = true +} + +func (v NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf(val *CreateNotifyWorkflowActionUsingEmailParametersToOneOf) *NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf { + return &NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf{value: val, isSet: true} +} + +func (v NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_notify_workflow_action_using_email_parameters_to_one_of_1.go b/pkg/api/v3/model_create_notify_workflow_action_using_email_parameters_to_one_of_1.go new file mode 100644 index 00000000..81d83b65 --- /dev/null +++ b/pkg/api/v3/model_create_notify_workflow_action_using_email_parameters_to_one_of_1.go @@ -0,0 +1,257 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateNotifyWorkflowActionUsingEmailParametersToOneOf1{} + +// CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 struct for CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 +type CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 struct { + Type ENUMROLES `json:"type"` + // Send the notification to global holders of the role + Global bool `json:"global"` + // Send the notification to holders of the role in the projects + ProjectIds []string `json:"projectIds"` + Roles []string `json:"roles"` + AdditionalProperties map[string]interface{} +} + +type _CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 + +// NewCreateNotifyWorkflowActionUsingEmailParametersToOneOf1 instantiates a new CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateNotifyWorkflowActionUsingEmailParametersToOneOf1(type_ ENUMROLES, global bool, projectIds []string, roles []string) *CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 { + this := CreateNotifyWorkflowActionUsingEmailParametersToOneOf1{} + this.Type = type_ + this.Global = global + this.ProjectIds = projectIds + this.Roles = roles + return &this +} + +// NewCreateNotifyWorkflowActionUsingEmailParametersToOneOf1WithDefaults instantiates a new CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateNotifyWorkflowActionUsingEmailParametersToOneOf1WithDefaults() *CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 { + this := CreateNotifyWorkflowActionUsingEmailParametersToOneOf1{} + return &this +} + +// GetType returns the Type field value +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf1) GetType() ENUMROLES { + if o == nil { + var ret ENUMROLES + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf1) GetTypeOk() (*ENUMROLES, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf1) SetType(v ENUMROLES) { + o.Type = v +} + +// GetGlobal returns the Global field value +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf1) GetGlobal() bool { + if o == nil { + var ret bool + return ret + } + + return o.Global +} + +// GetGlobalOk returns a tuple with the Global field value +// and a boolean to check if the value has been set. +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf1) GetGlobalOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Global, true +} + +// SetGlobal sets field value +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf1) SetGlobal(v bool) { + o.Global = v +} + +// GetProjectIds returns the ProjectIds field value +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf1) GetProjectIds() []string { + if o == nil { + var ret []string + return ret + } + + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value +// and a boolean to check if the value has been set. +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf1) GetProjectIdsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ProjectIds, true +} + +// SetProjectIds sets field value +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf1) SetProjectIds(v []string) { + o.ProjectIds = v +} + +// GetRoles returns the Roles field value +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf1) GetRoles() []string { + if o == nil { + var ret []string + return ret + } + + return o.Roles +} + +// GetRolesOk returns a tuple with the Roles field value +// and a boolean to check if the value has been set. +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf1) GetRolesOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.Roles, true +} + +// SetRoles sets field value +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf1) SetRoles(v []string) { + o.Roles = v +} + +func (o CreateNotifyWorkflowActionUsingEmailParametersToOneOf1) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateNotifyWorkflowActionUsingEmailParametersToOneOf1) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["global"] = o.Global + toSerialize["projectIds"] = o.ProjectIds + toSerialize["roles"] = o.Roles + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf1) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "global", + "projectIds", + "roles", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateNotifyWorkflowActionUsingEmailParametersToOneOf1 := _CreateNotifyWorkflowActionUsingEmailParametersToOneOf1{} + + err = json.Unmarshal(data, &varCreateNotifyWorkflowActionUsingEmailParametersToOneOf1) + + if err != nil { + return err + } + + *o = CreateNotifyWorkflowActionUsingEmailParametersToOneOf1(varCreateNotifyWorkflowActionUsingEmailParametersToOneOf1) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "global") + delete(additionalProperties, "projectIds") + delete(additionalProperties, "roles") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf1 struct { + value *CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 + isSet bool +} + +func (v NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf1) Get() *CreateNotifyWorkflowActionUsingEmailParametersToOneOf1 { + return v.value +} + +func (v *NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf1) Set(val *CreateNotifyWorkflowActionUsingEmailParametersToOneOf1) { + v.value = val + v.isSet = true +} + +func (v NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf1) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf1) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf1(val *CreateNotifyWorkflowActionUsingEmailParametersToOneOf1) *NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf1 { + return &NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf1{value: val, isSet: true} +} + +func (v NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf1) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf1) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_notify_workflow_action_using_email_parameters_to_one_of_2.go b/pkg/api/v3/model_create_notify_workflow_action_using_email_parameters_to_one_of_2.go new file mode 100644 index 00000000..d56d9e85 --- /dev/null +++ b/pkg/api/v3/model_create_notify_workflow_action_using_email_parameters_to_one_of_2.go @@ -0,0 +1,168 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateNotifyWorkflowActionUsingEmailParametersToOneOf2{} + +// CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 struct for CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 +type CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 struct { + Type ENUMOWNERS `json:"type"` + AdditionalProperties map[string]interface{} +} + +type _CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 + +// NewCreateNotifyWorkflowActionUsingEmailParametersToOneOf2 instantiates a new CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateNotifyWorkflowActionUsingEmailParametersToOneOf2(type_ ENUMOWNERS) *CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 { + this := CreateNotifyWorkflowActionUsingEmailParametersToOneOf2{} + this.Type = type_ + return &this +} + +// NewCreateNotifyWorkflowActionUsingEmailParametersToOneOf2WithDefaults instantiates a new CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateNotifyWorkflowActionUsingEmailParametersToOneOf2WithDefaults() *CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 { + this := CreateNotifyWorkflowActionUsingEmailParametersToOneOf2{} + return &this +} + +// GetType returns the Type field value +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf2) GetType() ENUMOWNERS { + if o == nil { + var ret ENUMOWNERS + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf2) GetTypeOk() (*ENUMOWNERS, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf2) SetType(v ENUMOWNERS) { + o.Type = v +} + +func (o CreateNotifyWorkflowActionUsingEmailParametersToOneOf2) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateNotifyWorkflowActionUsingEmailParametersToOneOf2) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateNotifyWorkflowActionUsingEmailParametersToOneOf2) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateNotifyWorkflowActionUsingEmailParametersToOneOf2 := _CreateNotifyWorkflowActionUsingEmailParametersToOneOf2{} + + err = json.Unmarshal(data, &varCreateNotifyWorkflowActionUsingEmailParametersToOneOf2) + + if err != nil { + return err + } + + *o = CreateNotifyWorkflowActionUsingEmailParametersToOneOf2(varCreateNotifyWorkflowActionUsingEmailParametersToOneOf2) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf2 struct { + value *CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 + isSet bool +} + +func (v NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf2) Get() *CreateNotifyWorkflowActionUsingEmailParametersToOneOf2 { + return v.value +} + +func (v *NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf2) Set(val *CreateNotifyWorkflowActionUsingEmailParametersToOneOf2) { + v.value = val + v.isSet = true +} + +func (v NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf2) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf2) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf2(val *CreateNotifyWorkflowActionUsingEmailParametersToOneOf2) *NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf2 { + return &NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf2{value: val, isSet: true} +} + +func (v NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf2) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateNotifyWorkflowActionUsingEmailParametersToOneOf2) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_notify_workflow_action_using_slack.go b/pkg/api/v3/model_create_notify_workflow_action_using_slack.go new file mode 100644 index 00000000..cfcac3eb --- /dev/null +++ b/pkg/api/v3/model_create_notify_workflow_action_using_slack.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateNotifyWorkflowActionUsingSlack type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateNotifyWorkflowActionUsingSlack{} + +// CreateNotifyWorkflowActionUsingSlack struct for CreateNotifyWorkflowActionUsingSlack +type CreateNotifyWorkflowActionUsingSlack struct { + Type ENUMNOTIFY `json:"type"` + Parameters CreateNotifyWorkflowActionUsingSlackParameters `json:"parameters"` + IntegrationKind ENUMSLACKWEBHOOK `json:"integrationKind"` + AdditionalProperties map[string]interface{} +} + +type _CreateNotifyWorkflowActionUsingSlack CreateNotifyWorkflowActionUsingSlack + +// NewCreateNotifyWorkflowActionUsingSlack instantiates a new CreateNotifyWorkflowActionUsingSlack object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateNotifyWorkflowActionUsingSlack(type_ ENUMNOTIFY, parameters CreateNotifyWorkflowActionUsingSlackParameters, integrationKind ENUMSLACKWEBHOOK) *CreateNotifyWorkflowActionUsingSlack { + this := CreateNotifyWorkflowActionUsingSlack{} + this.Type = type_ + this.Parameters = parameters + this.IntegrationKind = integrationKind + return &this +} + +// NewCreateNotifyWorkflowActionUsingSlackWithDefaults instantiates a new CreateNotifyWorkflowActionUsingSlack object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateNotifyWorkflowActionUsingSlackWithDefaults() *CreateNotifyWorkflowActionUsingSlack { + this := CreateNotifyWorkflowActionUsingSlack{} + return &this +} + +// GetType returns the Type field value +func (o *CreateNotifyWorkflowActionUsingSlack) GetType() ENUMNOTIFY { + if o == nil { + var ret ENUMNOTIFY + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CreateNotifyWorkflowActionUsingSlack) GetTypeOk() (*ENUMNOTIFY, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *CreateNotifyWorkflowActionUsingSlack) SetType(v ENUMNOTIFY) { + o.Type = v +} + +// GetParameters returns the Parameters field value +func (o *CreateNotifyWorkflowActionUsingSlack) GetParameters() CreateNotifyWorkflowActionUsingSlackParameters { + if o == nil { + var ret CreateNotifyWorkflowActionUsingSlackParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreateNotifyWorkflowActionUsingSlack) GetParametersOk() (*CreateNotifyWorkflowActionUsingSlackParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreateNotifyWorkflowActionUsingSlack) SetParameters(v CreateNotifyWorkflowActionUsingSlackParameters) { + o.Parameters = v +} + +// GetIntegrationKind returns the IntegrationKind field value +func (o *CreateNotifyWorkflowActionUsingSlack) GetIntegrationKind() ENUMSLACKWEBHOOK { + if o == nil { + var ret ENUMSLACKWEBHOOK + return ret + } + + return o.IntegrationKind +} + +// GetIntegrationKindOk returns a tuple with the IntegrationKind field value +// and a boolean to check if the value has been set. +func (o *CreateNotifyWorkflowActionUsingSlack) GetIntegrationKindOk() (*ENUMSLACKWEBHOOK, bool) { + if o == nil { + return nil, false + } + return &o.IntegrationKind, true +} + +// SetIntegrationKind sets field value +func (o *CreateNotifyWorkflowActionUsingSlack) SetIntegrationKind(v ENUMSLACKWEBHOOK) { + o.IntegrationKind = v +} + +func (o CreateNotifyWorkflowActionUsingSlack) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateNotifyWorkflowActionUsingSlack) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["parameters"] = o.Parameters + toSerialize["integrationKind"] = o.IntegrationKind + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateNotifyWorkflowActionUsingSlack) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "parameters", + "integrationKind", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateNotifyWorkflowActionUsingSlack := _CreateNotifyWorkflowActionUsingSlack{} + + err = json.Unmarshal(data, &varCreateNotifyWorkflowActionUsingSlack) + + if err != nil { + return err + } + + *o = CreateNotifyWorkflowActionUsingSlack(varCreateNotifyWorkflowActionUsingSlack) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "parameters") + delete(additionalProperties, "integrationKind") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateNotifyWorkflowActionUsingSlack struct { + value *CreateNotifyWorkflowActionUsingSlack + isSet bool +} + +func (v NullableCreateNotifyWorkflowActionUsingSlack) Get() *CreateNotifyWorkflowActionUsingSlack { + return v.value +} + +func (v *NullableCreateNotifyWorkflowActionUsingSlack) Set(val *CreateNotifyWorkflowActionUsingSlack) { + v.value = val + v.isSet = true +} + +func (v NullableCreateNotifyWorkflowActionUsingSlack) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateNotifyWorkflowActionUsingSlack) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateNotifyWorkflowActionUsingSlack(val *CreateNotifyWorkflowActionUsingSlack) *NullableCreateNotifyWorkflowActionUsingSlack { + return &NullableCreateNotifyWorkflowActionUsingSlack{value: val, isSet: true} +} + +func (v NullableCreateNotifyWorkflowActionUsingSlack) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateNotifyWorkflowActionUsingSlack) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_notify_workflow_action_using_slack_parameters.go b/pkg/api/v3/model_create_notify_workflow_action_using_slack_parameters.go new file mode 100644 index 00000000..21ad0ee6 --- /dev/null +++ b/pkg/api/v3/model_create_notify_workflow_action_using_slack_parameters.go @@ -0,0 +1,168 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateNotifyWorkflowActionUsingSlackParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateNotifyWorkflowActionUsingSlackParameters{} + +// CreateNotifyWorkflowActionUsingSlackParameters struct for CreateNotifyWorkflowActionUsingSlackParameters +type CreateNotifyWorkflowActionUsingSlackParameters struct { + Url string `json:"url"` + AdditionalProperties map[string]interface{} +} + +type _CreateNotifyWorkflowActionUsingSlackParameters CreateNotifyWorkflowActionUsingSlackParameters + +// NewCreateNotifyWorkflowActionUsingSlackParameters instantiates a new CreateNotifyWorkflowActionUsingSlackParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateNotifyWorkflowActionUsingSlackParameters(url string) *CreateNotifyWorkflowActionUsingSlackParameters { + this := CreateNotifyWorkflowActionUsingSlackParameters{} + this.Url = url + return &this +} + +// NewCreateNotifyWorkflowActionUsingSlackParametersWithDefaults instantiates a new CreateNotifyWorkflowActionUsingSlackParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateNotifyWorkflowActionUsingSlackParametersWithDefaults() *CreateNotifyWorkflowActionUsingSlackParameters { + this := CreateNotifyWorkflowActionUsingSlackParameters{} + return &this +} + +// GetUrl returns the Url field value +func (o *CreateNotifyWorkflowActionUsingSlackParameters) GetUrl() string { + if o == nil { + var ret string + return ret + } + + return o.Url +} + +// GetUrlOk returns a tuple with the Url field value +// and a boolean to check if the value has been set. +func (o *CreateNotifyWorkflowActionUsingSlackParameters) GetUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Url, true +} + +// SetUrl sets field value +func (o *CreateNotifyWorkflowActionUsingSlackParameters) SetUrl(v string) { + o.Url = v +} + +func (o CreateNotifyWorkflowActionUsingSlackParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateNotifyWorkflowActionUsingSlackParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["url"] = o.Url + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateNotifyWorkflowActionUsingSlackParameters) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "url", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateNotifyWorkflowActionUsingSlackParameters := _CreateNotifyWorkflowActionUsingSlackParameters{} + + err = json.Unmarshal(data, &varCreateNotifyWorkflowActionUsingSlackParameters) + + if err != nil { + return err + } + + *o = CreateNotifyWorkflowActionUsingSlackParameters(varCreateNotifyWorkflowActionUsingSlackParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "url") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateNotifyWorkflowActionUsingSlackParameters struct { + value *CreateNotifyWorkflowActionUsingSlackParameters + isSet bool +} + +func (v NullableCreateNotifyWorkflowActionUsingSlackParameters) Get() *CreateNotifyWorkflowActionUsingSlackParameters { + return v.value +} + +func (v *NullableCreateNotifyWorkflowActionUsingSlackParameters) Set(val *CreateNotifyWorkflowActionUsingSlackParameters) { + v.value = val + v.isSet = true +} + +func (v NullableCreateNotifyWorkflowActionUsingSlackParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateNotifyWorkflowActionUsingSlackParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateNotifyWorkflowActionUsingSlackParameters(val *CreateNotifyWorkflowActionUsingSlackParameters) *NullableCreateNotifyWorkflowActionUsingSlackParameters { + return &NullableCreateNotifyWorkflowActionUsingSlackParameters{value: val, isSet: true} +} + +func (v NullableCreateNotifyWorkflowActionUsingSlackParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateNotifyWorkflowActionUsingSlackParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_notify_workflow_action_using_teams.go b/pkg/api/v3/model_create_notify_workflow_action_using_teams.go new file mode 100644 index 00000000..5575609a --- /dev/null +++ b/pkg/api/v3/model_create_notify_workflow_action_using_teams.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateNotifyWorkflowActionUsingTeams type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateNotifyWorkflowActionUsingTeams{} + +// CreateNotifyWorkflowActionUsingTeams struct for CreateNotifyWorkflowActionUsingTeams +type CreateNotifyWorkflowActionUsingTeams struct { + Type ENUMNOTIFY `json:"type"` + Parameters CreateNotifyWorkflowActionUsingSlackParameters `json:"parameters"` + IntegrationKind ENUMTEAMSWEBHOOK `json:"integrationKind"` + AdditionalProperties map[string]interface{} +} + +type _CreateNotifyWorkflowActionUsingTeams CreateNotifyWorkflowActionUsingTeams + +// NewCreateNotifyWorkflowActionUsingTeams instantiates a new CreateNotifyWorkflowActionUsingTeams object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateNotifyWorkflowActionUsingTeams(type_ ENUMNOTIFY, parameters CreateNotifyWorkflowActionUsingSlackParameters, integrationKind ENUMTEAMSWEBHOOK) *CreateNotifyWorkflowActionUsingTeams { + this := CreateNotifyWorkflowActionUsingTeams{} + this.Type = type_ + this.Parameters = parameters + this.IntegrationKind = integrationKind + return &this +} + +// NewCreateNotifyWorkflowActionUsingTeamsWithDefaults instantiates a new CreateNotifyWorkflowActionUsingTeams object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateNotifyWorkflowActionUsingTeamsWithDefaults() *CreateNotifyWorkflowActionUsingTeams { + this := CreateNotifyWorkflowActionUsingTeams{} + return &this +} + +// GetType returns the Type field value +func (o *CreateNotifyWorkflowActionUsingTeams) GetType() ENUMNOTIFY { + if o == nil { + var ret ENUMNOTIFY + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CreateNotifyWorkflowActionUsingTeams) GetTypeOk() (*ENUMNOTIFY, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *CreateNotifyWorkflowActionUsingTeams) SetType(v ENUMNOTIFY) { + o.Type = v +} + +// GetParameters returns the Parameters field value +func (o *CreateNotifyWorkflowActionUsingTeams) GetParameters() CreateNotifyWorkflowActionUsingSlackParameters { + if o == nil { + var ret CreateNotifyWorkflowActionUsingSlackParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreateNotifyWorkflowActionUsingTeams) GetParametersOk() (*CreateNotifyWorkflowActionUsingSlackParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreateNotifyWorkflowActionUsingTeams) SetParameters(v CreateNotifyWorkflowActionUsingSlackParameters) { + o.Parameters = v +} + +// GetIntegrationKind returns the IntegrationKind field value +func (o *CreateNotifyWorkflowActionUsingTeams) GetIntegrationKind() ENUMTEAMSWEBHOOK { + if o == nil { + var ret ENUMTEAMSWEBHOOK + return ret + } + + return o.IntegrationKind +} + +// GetIntegrationKindOk returns a tuple with the IntegrationKind field value +// and a boolean to check if the value has been set. +func (o *CreateNotifyWorkflowActionUsingTeams) GetIntegrationKindOk() (*ENUMTEAMSWEBHOOK, bool) { + if o == nil { + return nil, false + } + return &o.IntegrationKind, true +} + +// SetIntegrationKind sets field value +func (o *CreateNotifyWorkflowActionUsingTeams) SetIntegrationKind(v ENUMTEAMSWEBHOOK) { + o.IntegrationKind = v +} + +func (o CreateNotifyWorkflowActionUsingTeams) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateNotifyWorkflowActionUsingTeams) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["parameters"] = o.Parameters + toSerialize["integrationKind"] = o.IntegrationKind + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateNotifyWorkflowActionUsingTeams) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "parameters", + "integrationKind", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateNotifyWorkflowActionUsingTeams := _CreateNotifyWorkflowActionUsingTeams{} + + err = json.Unmarshal(data, &varCreateNotifyWorkflowActionUsingTeams) + + if err != nil { + return err + } + + *o = CreateNotifyWorkflowActionUsingTeams(varCreateNotifyWorkflowActionUsingTeams) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "parameters") + delete(additionalProperties, "integrationKind") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateNotifyWorkflowActionUsingTeams struct { + value *CreateNotifyWorkflowActionUsingTeams + isSet bool +} + +func (v NullableCreateNotifyWorkflowActionUsingTeams) Get() *CreateNotifyWorkflowActionUsingTeams { + return v.value +} + +func (v *NullableCreateNotifyWorkflowActionUsingTeams) Set(val *CreateNotifyWorkflowActionUsingTeams) { + v.value = val + v.isSet = true +} + +func (v NullableCreateNotifyWorkflowActionUsingTeams) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateNotifyWorkflowActionUsingTeams) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateNotifyWorkflowActionUsingTeams(val *CreateNotifyWorkflowActionUsingTeams) *NullableCreateNotifyWorkflowActionUsingTeams { + return &NullableCreateNotifyWorkflowActionUsingTeams{value: val, isSet: true} +} + +func (v NullableCreateNotifyWorkflowActionUsingTeams) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateNotifyWorkflowActionUsingTeams) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_schema_via_fetch.go b/pkg/api/v3/model_create_schema_via_fetch.go index b998bf87..eab90d1f 100644 --- a/pkg/api/v3/model_create_schema_via_fetch.go +++ b/pkg/api/v3/model_create_schema_via_fetch.go @@ -22,6 +22,8 @@ var _ MappedNullable = &CreateSchemaViaFetch{} type CreateSchemaViaFetch struct { AssetType ENUMSCHEMA `json:"asset_type"` Name *string `json:"name,omitempty"` + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` Fetch CreateSchemaViaFetchFetch `json:"fetch"` // The authentication string of the asset AuthenticationStr *string `json:"authenticationStr,omitempty"` @@ -105,6 +107,38 @@ func (o *CreateSchemaViaFetch) SetName(v string) { o.Name = &v } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateSchemaViaFetch) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateSchemaViaFetch) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateSchemaViaFetch) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateSchemaViaFetch) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetFetch returns the Fetch field value func (o *CreateSchemaViaFetch) GetFetch() CreateSchemaViaFetchFetch { if o == nil { @@ -175,6 +209,9 @@ func (o CreateSchemaViaFetch) ToMap() (map[string]interface{}, error) { if !IsNil(o.Name) { toSerialize["name"] = o.Name } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["fetch"] = o.Fetch if !IsNil(o.AuthenticationStr) { toSerialize["authenticationStr"] = o.AuthenticationStr @@ -225,6 +262,7 @@ func (o *CreateSchemaViaFetch) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "asset_type") delete(additionalProperties, "name") + delete(additionalProperties, "projectIds") delete(additionalProperties, "fetch") delete(additionalProperties, "authenticationStr") o.AdditionalProperties = additionalProperties diff --git a/pkg/api/v3/model_create_schema_via_upload.go b/pkg/api/v3/model_create_schema_via_upload.go index 52f0bbde..34bbfb27 100644 --- a/pkg/api/v3/model_create_schema_via_upload.go +++ b/pkg/api/v3/model_create_schema_via_upload.go @@ -22,6 +22,8 @@ var _ MappedNullable = &CreateSchemaViaUpload{} type CreateSchemaViaUpload struct { AssetType ENUMSCHEMA `json:"asset_type"` Name *string `json:"name,omitempty"` + // The list of project IDs bind the asset on. + ProjectIds []string `json:"projectIds,omitempty"` Upload CreateSchemaViaUploadUpload `json:"upload"` AdditionalProperties map[string]interface{} } @@ -103,6 +105,38 @@ func (o *CreateSchemaViaUpload) SetName(v string) { o.Name = &v } +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateSchemaViaUpload) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateSchemaViaUpload) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateSchemaViaUpload) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateSchemaViaUpload) SetProjectIds(v []string) { + o.ProjectIds = v +} + // GetUpload returns the Upload field value func (o *CreateSchemaViaUpload) GetUpload() CreateSchemaViaUploadUpload { if o == nil { @@ -141,6 +175,9 @@ func (o CreateSchemaViaUpload) ToMap() (map[string]interface{}, error) { if !IsNil(o.Name) { toSerialize["name"] = o.Name } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } toSerialize["upload"] = o.Upload for key, value := range o.AdditionalProperties { @@ -188,6 +225,7 @@ func (o *CreateSchemaViaUpload) UnmarshalJSON(data []byte) (err error) { if err = json.Unmarshal(data, &additionalProperties); err == nil { delete(additionalProperties, "asset_type") delete(additionalProperties, "name") + delete(additionalProperties, "projectIds") delete(additionalProperties, "upload") o.AdditionalProperties = additionalProperties } diff --git a/pkg/api/v3/model_create_workflow_filter_using_custom_filter_on_assets.go b/pkg/api/v3/model_create_workflow_filter_using_custom_filter_on_assets.go new file mode 100644 index 00000000..d4ab9ecc --- /dev/null +++ b/pkg/api/v3/model_create_workflow_filter_using_custom_filter_on_assets.go @@ -0,0 +1,197 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateWorkflowFilterUsingCustomFilterOnAssets type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateWorkflowFilterUsingCustomFilterOnAssets{} + +// CreateWorkflowFilterUsingCustomFilterOnAssets struct for CreateWorkflowFilterUsingCustomFilterOnAssets +type CreateWorkflowFilterUsingCustomFilterOnAssets struct { + Type ENUMASSETS `json:"type"` + Filter CreateWorkflowFilterUsingCustomFilterOnAssetsFilter `json:"filter"` + AdditionalProperties map[string]interface{} +} + +type _CreateWorkflowFilterUsingCustomFilterOnAssets CreateWorkflowFilterUsingCustomFilterOnAssets + +// NewCreateWorkflowFilterUsingCustomFilterOnAssets instantiates a new CreateWorkflowFilterUsingCustomFilterOnAssets object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateWorkflowFilterUsingCustomFilterOnAssets(type_ ENUMASSETS, filter CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) *CreateWorkflowFilterUsingCustomFilterOnAssets { + this := CreateWorkflowFilterUsingCustomFilterOnAssets{} + this.Type = type_ + this.Filter = filter + return &this +} + +// NewCreateWorkflowFilterUsingCustomFilterOnAssetsWithDefaults instantiates a new CreateWorkflowFilterUsingCustomFilterOnAssets object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateWorkflowFilterUsingCustomFilterOnAssetsWithDefaults() *CreateWorkflowFilterUsingCustomFilterOnAssets { + this := CreateWorkflowFilterUsingCustomFilterOnAssets{} + return &this +} + +// GetType returns the Type field value +func (o *CreateWorkflowFilterUsingCustomFilterOnAssets) GetType() ENUMASSETS { + if o == nil { + var ret ENUMASSETS + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssets) GetTypeOk() (*ENUMASSETS, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *CreateWorkflowFilterUsingCustomFilterOnAssets) SetType(v ENUMASSETS) { + o.Type = v +} + +// GetFilter returns the Filter field value +func (o *CreateWorkflowFilterUsingCustomFilterOnAssets) GetFilter() CreateWorkflowFilterUsingCustomFilterOnAssetsFilter { + if o == nil { + var ret CreateWorkflowFilterUsingCustomFilterOnAssetsFilter + return ret + } + + return o.Filter +} + +// GetFilterOk returns a tuple with the Filter field value +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssets) GetFilterOk() (*CreateWorkflowFilterUsingCustomFilterOnAssetsFilter, bool) { + if o == nil { + return nil, false + } + return &o.Filter, true +} + +// SetFilter sets field value +func (o *CreateWorkflowFilterUsingCustomFilterOnAssets) SetFilter(v CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) { + o.Filter = v +} + +func (o CreateWorkflowFilterUsingCustomFilterOnAssets) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateWorkflowFilterUsingCustomFilterOnAssets) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["filter"] = o.Filter + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateWorkflowFilterUsingCustomFilterOnAssets) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "filter", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateWorkflowFilterUsingCustomFilterOnAssets := _CreateWorkflowFilterUsingCustomFilterOnAssets{} + + err = json.Unmarshal(data, &varCreateWorkflowFilterUsingCustomFilterOnAssets) + + if err != nil { + return err + } + + *o = CreateWorkflowFilterUsingCustomFilterOnAssets(varCreateWorkflowFilterUsingCustomFilterOnAssets) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "filter") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateWorkflowFilterUsingCustomFilterOnAssets struct { + value *CreateWorkflowFilterUsingCustomFilterOnAssets + isSet bool +} + +func (v NullableCreateWorkflowFilterUsingCustomFilterOnAssets) Get() *CreateWorkflowFilterUsingCustomFilterOnAssets { + return v.value +} + +func (v *NullableCreateWorkflowFilterUsingCustomFilterOnAssets) Set(val *CreateWorkflowFilterUsingCustomFilterOnAssets) { + v.value = val + v.isSet = true +} + +func (v NullableCreateWorkflowFilterUsingCustomFilterOnAssets) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateWorkflowFilterUsingCustomFilterOnAssets) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateWorkflowFilterUsingCustomFilterOnAssets(val *CreateWorkflowFilterUsingCustomFilterOnAssets) *NullableCreateWorkflowFilterUsingCustomFilterOnAssets { + return &NullableCreateWorkflowFilterUsingCustomFilterOnAssets{value: val, isSet: true} +} + +func (v NullableCreateWorkflowFilterUsingCustomFilterOnAssets) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateWorkflowFilterUsingCustomFilterOnAssets) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_workflow_filter_using_custom_filter_on_assets_filter.go b/pkg/api/v3/model_create_workflow_filter_using_custom_filter_on_assets_filter.go new file mode 100644 index 00000000..340e6efd --- /dev/null +++ b/pkg/api/v3/model_create_workflow_filter_using_custom_filter_on_assets_filter.go @@ -0,0 +1,1117 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" +) + +// checks if the CreateWorkflowFilterUsingCustomFilterOnAssetsFilter type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateWorkflowFilterUsingCustomFilterOnAssetsFilter{} + +// CreateWorkflowFilterUsingCustomFilterOnAssetsFilter struct for CreateWorkflowFilterUsingCustomFilterOnAssetsFilter +type CreateWorkflowFilterUsingCustomFilterOnAssetsFilter struct { + Search *string `json:"search,omitempty"` + Risks []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESRISKSITEMS `json:"risks,omitempty"` + TagIds []string `json:"tagIds,omitempty"` + IntegrationIds []string `json:"integrationIds,omitempty"` + Types []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESTYPE `json:"types,omitempty"` + Classes []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESCLASS `json:"classes,omitempty"` + ProjectIds []string `json:"projectIds,omitempty"` + NoProjects *bool `json:"noProjects,omitempty"` + ApplicationIds []string `json:"applicationIds,omitempty"` + FoundByProfileIds []string `json:"foundByProfileIds,omitempty"` + ScanIds []string `json:"scanIds,omitempty"` + ScannerKinds []ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS `json:"scannerKinds,omitempty"` + Domains []string `json:"domains,omitempty"` + Environments []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSERVICEPROPERTIESENVIRONMENT `json:"environments,omitempty"` + CloudProviders []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSERVICEPROPERTIESCLOUDPROVIDER `json:"cloudProviders,omitempty"` + WafProviders []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSERVICEPROPERTIESWAFPROVIDER `json:"wafProviders,omitempty"` + Statuses []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSTATUS `json:"statuses,omitempty"` + Severities []ENUMPROPERTIESDATAITEMSPROPERTIESSEVERITY `json:"severities,omitempty"` + SourceAssetIds []string `json:"sourceAssetIds,omitempty"` + SchemaIds []string `json:"schemaIds,omitempty"` + AssetIds []string `json:"assetIds,omitempty"` + BlacklistAssetIds []string `json:"blacklistAssetIds,omitempty"` + ManuallyCreated *bool `json:"manuallyCreated,omitempty"` + Visibility []ENUMPROPERTIESVISIBILITY `json:"visibility,omitempty"` + Ports []float32 `json:"ports,omitempty"` + PrioritizeFavorites *bool `json:"prioritizeFavorites,omitempty"` + NoTags *bool `json:"noTags,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateWorkflowFilterUsingCustomFilterOnAssetsFilter CreateWorkflowFilterUsingCustomFilterOnAssetsFilter + +// NewCreateWorkflowFilterUsingCustomFilterOnAssetsFilter instantiates a new CreateWorkflowFilterUsingCustomFilterOnAssetsFilter object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateWorkflowFilterUsingCustomFilterOnAssetsFilter() *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter { + this := CreateWorkflowFilterUsingCustomFilterOnAssetsFilter{} + return &this +} + +// NewCreateWorkflowFilterUsingCustomFilterOnAssetsFilterWithDefaults instantiates a new CreateWorkflowFilterUsingCustomFilterOnAssetsFilter object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateWorkflowFilterUsingCustomFilterOnAssetsFilterWithDefaults() *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter { + this := CreateWorkflowFilterUsingCustomFilterOnAssetsFilter{} + return &this +} + +// GetSearch returns the Search field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetSearch() string { + if o == nil || IsNil(o.Search) { + var ret string + return ret + } + return *o.Search +} + +// GetSearchOk returns a tuple with the Search field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetSearchOk() (*string, bool) { + if o == nil || IsNil(o.Search) { + return nil, false + } + return o.Search, true +} + +// HasSearch returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasSearch() bool { + if o != nil && !IsNil(o.Search) { + return true + } + + return false +} + +// SetSearch gets a reference to the given string and assigns it to the Search field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetSearch(v string) { + o.Search = &v +} + +// GetRisks returns the Risks field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetRisks() []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESRISKSITEMS { + if o == nil || IsNil(o.Risks) { + var ret []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESRISKSITEMS + return ret + } + return o.Risks +} + +// GetRisksOk returns a tuple with the Risks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetRisksOk() ([]ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESRISKSITEMS, bool) { + if o == nil || IsNil(o.Risks) { + return nil, false + } + return o.Risks, true +} + +// HasRisks returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasRisks() bool { + if o != nil && !IsNil(o.Risks) { + return true + } + + return false +} + +// SetRisks gets a reference to the given []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESRISKSITEMS and assigns it to the Risks field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetRisks(v []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESRISKSITEMS) { + o.Risks = v +} + +// GetTagIds returns the TagIds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetTagIds() []string { + if o == nil || IsNil(o.TagIds) { + var ret []string + return ret + } + return o.TagIds +} + +// GetTagIdsOk returns a tuple with the TagIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetTagIdsOk() ([]string, bool) { + if o == nil || IsNil(o.TagIds) { + return nil, false + } + return o.TagIds, true +} + +// HasTagIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasTagIds() bool { + if o != nil && !IsNil(o.TagIds) { + return true + } + + return false +} + +// SetTagIds gets a reference to the given []string and assigns it to the TagIds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetTagIds(v []string) { + o.TagIds = v +} + +// GetIntegrationIds returns the IntegrationIds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetIntegrationIds() []string { + if o == nil || IsNil(o.IntegrationIds) { + var ret []string + return ret + } + return o.IntegrationIds +} + +// GetIntegrationIdsOk returns a tuple with the IntegrationIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetIntegrationIdsOk() ([]string, bool) { + if o == nil || IsNil(o.IntegrationIds) { + return nil, false + } + return o.IntegrationIds, true +} + +// HasIntegrationIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasIntegrationIds() bool { + if o != nil && !IsNil(o.IntegrationIds) { + return true + } + + return false +} + +// SetIntegrationIds gets a reference to the given []string and assigns it to the IntegrationIds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetIntegrationIds(v []string) { + o.IntegrationIds = v +} + +// GetTypes returns the Types field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetTypes() []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESTYPE { + if o == nil || IsNil(o.Types) { + var ret []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESTYPE + return ret + } + return o.Types +} + +// GetTypesOk returns a tuple with the Types field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetTypesOk() ([]ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESTYPE, bool) { + if o == nil || IsNil(o.Types) { + return nil, false + } + return o.Types, true +} + +// HasTypes returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasTypes() bool { + if o != nil && !IsNil(o.Types) { + return true + } + + return false +} + +// SetTypes gets a reference to the given []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESTYPE and assigns it to the Types field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetTypes(v []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESTYPE) { + o.Types = v +} + +// GetClasses returns the Classes field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetClasses() []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESCLASS { + if o == nil || IsNil(o.Classes) { + var ret []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESCLASS + return ret + } + return o.Classes +} + +// GetClassesOk returns a tuple with the Classes field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetClassesOk() ([]ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESCLASS, bool) { + if o == nil || IsNil(o.Classes) { + return nil, false + } + return o.Classes, true +} + +// HasClasses returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasClasses() bool { + if o != nil && !IsNil(o.Classes) { + return true + } + + return false +} + +// SetClasses gets a reference to the given []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESCLASS and assigns it to the Classes field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetClasses(v []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESCLASS) { + o.Classes = v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetProjectIds(v []string) { + o.ProjectIds = v +} + +// GetNoProjects returns the NoProjects field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetNoProjects() bool { + if o == nil || IsNil(o.NoProjects) { + var ret bool + return ret + } + return *o.NoProjects +} + +// GetNoProjectsOk returns a tuple with the NoProjects field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetNoProjectsOk() (*bool, bool) { + if o == nil || IsNil(o.NoProjects) { + return nil, false + } + return o.NoProjects, true +} + +// HasNoProjects returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasNoProjects() bool { + if o != nil && !IsNil(o.NoProjects) { + return true + } + + return false +} + +// SetNoProjects gets a reference to the given bool and assigns it to the NoProjects field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetNoProjects(v bool) { + o.NoProjects = &v +} + +// GetApplicationIds returns the ApplicationIds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetApplicationIds() []string { + if o == nil || IsNil(o.ApplicationIds) { + var ret []string + return ret + } + return o.ApplicationIds +} + +// GetApplicationIdsOk returns a tuple with the ApplicationIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetApplicationIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ApplicationIds) { + return nil, false + } + return o.ApplicationIds, true +} + +// HasApplicationIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasApplicationIds() bool { + if o != nil && !IsNil(o.ApplicationIds) { + return true + } + + return false +} + +// SetApplicationIds gets a reference to the given []string and assigns it to the ApplicationIds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetApplicationIds(v []string) { + o.ApplicationIds = v +} + +// GetFoundByProfileIds returns the FoundByProfileIds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetFoundByProfileIds() []string { + if o == nil || IsNil(o.FoundByProfileIds) { + var ret []string + return ret + } + return o.FoundByProfileIds +} + +// GetFoundByProfileIdsOk returns a tuple with the FoundByProfileIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetFoundByProfileIdsOk() ([]string, bool) { + if o == nil || IsNil(o.FoundByProfileIds) { + return nil, false + } + return o.FoundByProfileIds, true +} + +// HasFoundByProfileIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasFoundByProfileIds() bool { + if o != nil && !IsNil(o.FoundByProfileIds) { + return true + } + + return false +} + +// SetFoundByProfileIds gets a reference to the given []string and assigns it to the FoundByProfileIds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetFoundByProfileIds(v []string) { + o.FoundByProfileIds = v +} + +// GetScanIds returns the ScanIds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetScanIds() []string { + if o == nil || IsNil(o.ScanIds) { + var ret []string + return ret + } + return o.ScanIds +} + +// GetScanIdsOk returns a tuple with the ScanIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetScanIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ScanIds) { + return nil, false + } + return o.ScanIds, true +} + +// HasScanIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasScanIds() bool { + if o != nil && !IsNil(o.ScanIds) { + return true + } + + return false +} + +// SetScanIds gets a reference to the given []string and assigns it to the ScanIds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetScanIds(v []string) { + o.ScanIds = v +} + +// GetScannerKinds returns the ScannerKinds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetScannerKinds() []ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS { + if o == nil || IsNil(o.ScannerKinds) { + var ret []ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS + return ret + } + return o.ScannerKinds +} + +// GetScannerKindsOk returns a tuple with the ScannerKinds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetScannerKindsOk() ([]ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS, bool) { + if o == nil || IsNil(o.ScannerKinds) { + return nil, false + } + return o.ScannerKinds, true +} + +// HasScannerKinds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasScannerKinds() bool { + if o != nil && !IsNil(o.ScannerKinds) { + return true + } + + return false +} + +// SetScannerKinds gets a reference to the given []ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS and assigns it to the ScannerKinds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetScannerKinds(v []ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS) { + o.ScannerKinds = v +} + +// GetDomains returns the Domains field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetDomains() []string { + if o == nil || IsNil(o.Domains) { + var ret []string + return ret + } + return o.Domains +} + +// GetDomainsOk returns a tuple with the Domains field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetDomainsOk() ([]string, bool) { + if o == nil || IsNil(o.Domains) { + return nil, false + } + return o.Domains, true +} + +// HasDomains returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasDomains() bool { + if o != nil && !IsNil(o.Domains) { + return true + } + + return false +} + +// SetDomains gets a reference to the given []string and assigns it to the Domains field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetDomains(v []string) { + o.Domains = v +} + +// GetEnvironments returns the Environments field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetEnvironments() []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSERVICEPROPERTIESENVIRONMENT { + if o == nil || IsNil(o.Environments) { + var ret []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSERVICEPROPERTIESENVIRONMENT + return ret + } + return o.Environments +} + +// GetEnvironmentsOk returns a tuple with the Environments field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetEnvironmentsOk() ([]ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSERVICEPROPERTIESENVIRONMENT, bool) { + if o == nil || IsNil(o.Environments) { + return nil, false + } + return o.Environments, true +} + +// HasEnvironments returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasEnvironments() bool { + if o != nil && !IsNil(o.Environments) { + return true + } + + return false +} + +// SetEnvironments gets a reference to the given []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSERVICEPROPERTIESENVIRONMENT and assigns it to the Environments field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetEnvironments(v []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSERVICEPROPERTIESENVIRONMENT) { + o.Environments = v +} + +// GetCloudProviders returns the CloudProviders field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetCloudProviders() []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSERVICEPROPERTIESCLOUDPROVIDER { + if o == nil || IsNil(o.CloudProviders) { + var ret []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSERVICEPROPERTIESCLOUDPROVIDER + return ret + } + return o.CloudProviders +} + +// GetCloudProvidersOk returns a tuple with the CloudProviders field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetCloudProvidersOk() ([]ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSERVICEPROPERTIESCLOUDPROVIDER, bool) { + if o == nil || IsNil(o.CloudProviders) { + return nil, false + } + return o.CloudProviders, true +} + +// HasCloudProviders returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasCloudProviders() bool { + if o != nil && !IsNil(o.CloudProviders) { + return true + } + + return false +} + +// SetCloudProviders gets a reference to the given []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSERVICEPROPERTIESCLOUDPROVIDER and assigns it to the CloudProviders field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetCloudProviders(v []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSERVICEPROPERTIESCLOUDPROVIDER) { + o.CloudProviders = v +} + +// GetWafProviders returns the WafProviders field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetWafProviders() []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSERVICEPROPERTIESWAFPROVIDER { + if o == nil || IsNil(o.WafProviders) { + var ret []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSERVICEPROPERTIESWAFPROVIDER + return ret + } + return o.WafProviders +} + +// GetWafProvidersOk returns a tuple with the WafProviders field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetWafProvidersOk() ([]ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSERVICEPROPERTIESWAFPROVIDER, bool) { + if o == nil || IsNil(o.WafProviders) { + return nil, false + } + return o.WafProviders, true +} + +// HasWafProviders returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasWafProviders() bool { + if o != nil && !IsNil(o.WafProviders) { + return true + } + + return false +} + +// SetWafProviders gets a reference to the given []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSERVICEPROPERTIESWAFPROVIDER and assigns it to the WafProviders field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetWafProviders(v []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSERVICEPROPERTIESWAFPROVIDER) { + o.WafProviders = v +} + +// GetStatuses returns the Statuses field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetStatuses() []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSTATUS { + if o == nil || IsNil(o.Statuses) { + var ret []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSTATUS + return ret + } + return o.Statuses +} + +// GetStatusesOk returns a tuple with the Statuses field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetStatusesOk() ([]ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSTATUS, bool) { + if o == nil || IsNil(o.Statuses) { + return nil, false + } + return o.Statuses, true +} + +// HasStatuses returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasStatuses() bool { + if o != nil && !IsNil(o.Statuses) { + return true + } + + return false +} + +// SetStatuses gets a reference to the given []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSTATUS and assigns it to the Statuses field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetStatuses(v []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSTATUS) { + o.Statuses = v +} + +// GetSeverities returns the Severities field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetSeverities() []ENUMPROPERTIESDATAITEMSPROPERTIESSEVERITY { + if o == nil || IsNil(o.Severities) { + var ret []ENUMPROPERTIESDATAITEMSPROPERTIESSEVERITY + return ret + } + return o.Severities +} + +// GetSeveritiesOk returns a tuple with the Severities field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetSeveritiesOk() ([]ENUMPROPERTIESDATAITEMSPROPERTIESSEVERITY, bool) { + if o == nil || IsNil(o.Severities) { + return nil, false + } + return o.Severities, true +} + +// HasSeverities returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasSeverities() bool { + if o != nil && !IsNil(o.Severities) { + return true + } + + return false +} + +// SetSeverities gets a reference to the given []ENUMPROPERTIESDATAITEMSPROPERTIESSEVERITY and assigns it to the Severities field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetSeverities(v []ENUMPROPERTIESDATAITEMSPROPERTIESSEVERITY) { + o.Severities = v +} + +// GetSourceAssetIds returns the SourceAssetIds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetSourceAssetIds() []string { + if o == nil || IsNil(o.SourceAssetIds) { + var ret []string + return ret + } + return o.SourceAssetIds +} + +// GetSourceAssetIdsOk returns a tuple with the SourceAssetIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetSourceAssetIdsOk() ([]string, bool) { + if o == nil || IsNil(o.SourceAssetIds) { + return nil, false + } + return o.SourceAssetIds, true +} + +// HasSourceAssetIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasSourceAssetIds() bool { + if o != nil && !IsNil(o.SourceAssetIds) { + return true + } + + return false +} + +// SetSourceAssetIds gets a reference to the given []string and assigns it to the SourceAssetIds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetSourceAssetIds(v []string) { + o.SourceAssetIds = v +} + +// GetSchemaIds returns the SchemaIds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetSchemaIds() []string { + if o == nil || IsNil(o.SchemaIds) { + var ret []string + return ret + } + return o.SchemaIds +} + +// GetSchemaIdsOk returns a tuple with the SchemaIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetSchemaIdsOk() ([]string, bool) { + if o == nil || IsNil(o.SchemaIds) { + return nil, false + } + return o.SchemaIds, true +} + +// HasSchemaIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasSchemaIds() bool { + if o != nil && !IsNil(o.SchemaIds) { + return true + } + + return false +} + +// SetSchemaIds gets a reference to the given []string and assigns it to the SchemaIds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetSchemaIds(v []string) { + o.SchemaIds = v +} + +// GetAssetIds returns the AssetIds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetAssetIds() []string { + if o == nil || IsNil(o.AssetIds) { + var ret []string + return ret + } + return o.AssetIds +} + +// GetAssetIdsOk returns a tuple with the AssetIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetAssetIdsOk() ([]string, bool) { + if o == nil || IsNil(o.AssetIds) { + return nil, false + } + return o.AssetIds, true +} + +// HasAssetIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasAssetIds() bool { + if o != nil && !IsNil(o.AssetIds) { + return true + } + + return false +} + +// SetAssetIds gets a reference to the given []string and assigns it to the AssetIds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetAssetIds(v []string) { + o.AssetIds = v +} + +// GetBlacklistAssetIds returns the BlacklistAssetIds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetBlacklistAssetIds() []string { + if o == nil || IsNil(o.BlacklistAssetIds) { + var ret []string + return ret + } + return o.BlacklistAssetIds +} + +// GetBlacklistAssetIdsOk returns a tuple with the BlacklistAssetIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetBlacklistAssetIdsOk() ([]string, bool) { + if o == nil || IsNil(o.BlacklistAssetIds) { + return nil, false + } + return o.BlacklistAssetIds, true +} + +// HasBlacklistAssetIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasBlacklistAssetIds() bool { + if o != nil && !IsNil(o.BlacklistAssetIds) { + return true + } + + return false +} + +// SetBlacklistAssetIds gets a reference to the given []string and assigns it to the BlacklistAssetIds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetBlacklistAssetIds(v []string) { + o.BlacklistAssetIds = v +} + +// GetManuallyCreated returns the ManuallyCreated field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetManuallyCreated() bool { + if o == nil || IsNil(o.ManuallyCreated) { + var ret bool + return ret + } + return *o.ManuallyCreated +} + +// GetManuallyCreatedOk returns a tuple with the ManuallyCreated field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetManuallyCreatedOk() (*bool, bool) { + if o == nil || IsNil(o.ManuallyCreated) { + return nil, false + } + return o.ManuallyCreated, true +} + +// HasManuallyCreated returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasManuallyCreated() bool { + if o != nil && !IsNil(o.ManuallyCreated) { + return true + } + + return false +} + +// SetManuallyCreated gets a reference to the given bool and assigns it to the ManuallyCreated field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetManuallyCreated(v bool) { + o.ManuallyCreated = &v +} + +// GetVisibility returns the Visibility field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetVisibility() []ENUMPROPERTIESVISIBILITY { + if o == nil || IsNil(o.Visibility) { + var ret []ENUMPROPERTIESVISIBILITY + return ret + } + return o.Visibility +} + +// GetVisibilityOk returns a tuple with the Visibility field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetVisibilityOk() ([]ENUMPROPERTIESVISIBILITY, bool) { + if o == nil || IsNil(o.Visibility) { + return nil, false + } + return o.Visibility, true +} + +// HasVisibility returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasVisibility() bool { + if o != nil && !IsNil(o.Visibility) { + return true + } + + return false +} + +// SetVisibility gets a reference to the given []ENUMPROPERTIESVISIBILITY and assigns it to the Visibility field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetVisibility(v []ENUMPROPERTIESVISIBILITY) { + o.Visibility = v +} + +// GetPorts returns the Ports field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetPorts() []float32 { + if o == nil || IsNil(o.Ports) { + var ret []float32 + return ret + } + return o.Ports +} + +// GetPortsOk returns a tuple with the Ports field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetPortsOk() ([]float32, bool) { + if o == nil || IsNil(o.Ports) { + return nil, false + } + return o.Ports, true +} + +// HasPorts returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasPorts() bool { + if o != nil && !IsNil(o.Ports) { + return true + } + + return false +} + +// SetPorts gets a reference to the given []float32 and assigns it to the Ports field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetPorts(v []float32) { + o.Ports = v +} + +// GetPrioritizeFavorites returns the PrioritizeFavorites field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetPrioritizeFavorites() bool { + if o == nil || IsNil(o.PrioritizeFavorites) { + var ret bool + return ret + } + return *o.PrioritizeFavorites +} + +// GetPrioritizeFavoritesOk returns a tuple with the PrioritizeFavorites field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetPrioritizeFavoritesOk() (*bool, bool) { + if o == nil || IsNil(o.PrioritizeFavorites) { + return nil, false + } + return o.PrioritizeFavorites, true +} + +// HasPrioritizeFavorites returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasPrioritizeFavorites() bool { + if o != nil && !IsNil(o.PrioritizeFavorites) { + return true + } + + return false +} + +// SetPrioritizeFavorites gets a reference to the given bool and assigns it to the PrioritizeFavorites field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetPrioritizeFavorites(v bool) { + o.PrioritizeFavorites = &v +} + +// GetNoTags returns the NoTags field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetNoTags() bool { + if o == nil || IsNil(o.NoTags) { + var ret bool + return ret + } + return *o.NoTags +} + +// GetNoTagsOk returns a tuple with the NoTags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) GetNoTagsOk() (*bool, bool) { + if o == nil || IsNil(o.NoTags) { + return nil, false + } + return o.NoTags, true +} + +// HasNoTags returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) HasNoTags() bool { + if o != nil && !IsNil(o.NoTags) { + return true + } + + return false +} + +// SetNoTags gets a reference to the given bool and assigns it to the NoTags field. +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) SetNoTags(v bool) { + o.NoTags = &v +} + +func (o CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Search) { + toSerialize["search"] = o.Search + } + if !IsNil(o.Risks) { + toSerialize["risks"] = o.Risks + } + if !IsNil(o.TagIds) { + toSerialize["tagIds"] = o.TagIds + } + if !IsNil(o.IntegrationIds) { + toSerialize["integrationIds"] = o.IntegrationIds + } + if !IsNil(o.Types) { + toSerialize["types"] = o.Types + } + if !IsNil(o.Classes) { + toSerialize["classes"] = o.Classes + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + if !IsNil(o.NoProjects) { + toSerialize["noProjects"] = o.NoProjects + } + if !IsNil(o.ApplicationIds) { + toSerialize["applicationIds"] = o.ApplicationIds + } + if !IsNil(o.FoundByProfileIds) { + toSerialize["foundByProfileIds"] = o.FoundByProfileIds + } + if !IsNil(o.ScanIds) { + toSerialize["scanIds"] = o.ScanIds + } + if !IsNil(o.ScannerKinds) { + toSerialize["scannerKinds"] = o.ScannerKinds + } + if !IsNil(o.Domains) { + toSerialize["domains"] = o.Domains + } + if !IsNil(o.Environments) { + toSerialize["environments"] = o.Environments + } + if !IsNil(o.CloudProviders) { + toSerialize["cloudProviders"] = o.CloudProviders + } + if !IsNil(o.WafProviders) { + toSerialize["wafProviders"] = o.WafProviders + } + if !IsNil(o.Statuses) { + toSerialize["statuses"] = o.Statuses + } + if !IsNil(o.Severities) { + toSerialize["severities"] = o.Severities + } + if !IsNil(o.SourceAssetIds) { + toSerialize["sourceAssetIds"] = o.SourceAssetIds + } + if !IsNil(o.SchemaIds) { + toSerialize["schemaIds"] = o.SchemaIds + } + if !IsNil(o.AssetIds) { + toSerialize["assetIds"] = o.AssetIds + } + if !IsNil(o.BlacklistAssetIds) { + toSerialize["blacklistAssetIds"] = o.BlacklistAssetIds + } + if !IsNil(o.ManuallyCreated) { + toSerialize["manuallyCreated"] = o.ManuallyCreated + } + if !IsNil(o.Visibility) { + toSerialize["visibility"] = o.Visibility + } + if !IsNil(o.Ports) { + toSerialize["ports"] = o.Ports + } + if !IsNil(o.PrioritizeFavorites) { + toSerialize["prioritizeFavorites"] = o.PrioritizeFavorites + } + if !IsNil(o.NoTags) { + toSerialize["noTags"] = o.NoTags + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) UnmarshalJSON(data []byte) (err error) { + varCreateWorkflowFilterUsingCustomFilterOnAssetsFilter := _CreateWorkflowFilterUsingCustomFilterOnAssetsFilter{} + + err = json.Unmarshal(data, &varCreateWorkflowFilterUsingCustomFilterOnAssetsFilter) + + if err != nil { + return err + } + + *o = CreateWorkflowFilterUsingCustomFilterOnAssetsFilter(varCreateWorkflowFilterUsingCustomFilterOnAssetsFilter) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "search") + delete(additionalProperties, "risks") + delete(additionalProperties, "tagIds") + delete(additionalProperties, "integrationIds") + delete(additionalProperties, "types") + delete(additionalProperties, "classes") + delete(additionalProperties, "projectIds") + delete(additionalProperties, "noProjects") + delete(additionalProperties, "applicationIds") + delete(additionalProperties, "foundByProfileIds") + delete(additionalProperties, "scanIds") + delete(additionalProperties, "scannerKinds") + delete(additionalProperties, "domains") + delete(additionalProperties, "environments") + delete(additionalProperties, "cloudProviders") + delete(additionalProperties, "wafProviders") + delete(additionalProperties, "statuses") + delete(additionalProperties, "severities") + delete(additionalProperties, "sourceAssetIds") + delete(additionalProperties, "schemaIds") + delete(additionalProperties, "assetIds") + delete(additionalProperties, "blacklistAssetIds") + delete(additionalProperties, "manuallyCreated") + delete(additionalProperties, "visibility") + delete(additionalProperties, "ports") + delete(additionalProperties, "prioritizeFavorites") + delete(additionalProperties, "noTags") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateWorkflowFilterUsingCustomFilterOnAssetsFilter struct { + value *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter + isSet bool +} + +func (v NullableCreateWorkflowFilterUsingCustomFilterOnAssetsFilter) Get() *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter { + return v.value +} + +func (v *NullableCreateWorkflowFilterUsingCustomFilterOnAssetsFilter) Set(val *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) { + v.value = val + v.isSet = true +} + +func (v NullableCreateWorkflowFilterUsingCustomFilterOnAssetsFilter) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateWorkflowFilterUsingCustomFilterOnAssetsFilter) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateWorkflowFilterUsingCustomFilterOnAssetsFilter(val *CreateWorkflowFilterUsingCustomFilterOnAssetsFilter) *NullableCreateWorkflowFilterUsingCustomFilterOnAssetsFilter { + return &NullableCreateWorkflowFilterUsingCustomFilterOnAssetsFilter{value: val, isSet: true} +} + +func (v NullableCreateWorkflowFilterUsingCustomFilterOnAssetsFilter) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateWorkflowFilterUsingCustomFilterOnAssetsFilter) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_workflow_filter_using_custom_filter_on_issues.go b/pkg/api/v3/model_create_workflow_filter_using_custom_filter_on_issues.go new file mode 100644 index 00000000..eef14537 --- /dev/null +++ b/pkg/api/v3/model_create_workflow_filter_using_custom_filter_on_issues.go @@ -0,0 +1,197 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateWorkflowFilterUsingCustomFilterOnIssues type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateWorkflowFilterUsingCustomFilterOnIssues{} + +// CreateWorkflowFilterUsingCustomFilterOnIssues struct for CreateWorkflowFilterUsingCustomFilterOnIssues +type CreateWorkflowFilterUsingCustomFilterOnIssues struct { + Type ENUMISSUES `json:"type"` + Filter CreateWorkflowFilterUsingCustomFilterOnIssuesFilter `json:"filter"` + AdditionalProperties map[string]interface{} +} + +type _CreateWorkflowFilterUsingCustomFilterOnIssues CreateWorkflowFilterUsingCustomFilterOnIssues + +// NewCreateWorkflowFilterUsingCustomFilterOnIssues instantiates a new CreateWorkflowFilterUsingCustomFilterOnIssues object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateWorkflowFilterUsingCustomFilterOnIssues(type_ ENUMISSUES, filter CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) *CreateWorkflowFilterUsingCustomFilterOnIssues { + this := CreateWorkflowFilterUsingCustomFilterOnIssues{} + this.Type = type_ + this.Filter = filter + return &this +} + +// NewCreateWorkflowFilterUsingCustomFilterOnIssuesWithDefaults instantiates a new CreateWorkflowFilterUsingCustomFilterOnIssues object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateWorkflowFilterUsingCustomFilterOnIssuesWithDefaults() *CreateWorkflowFilterUsingCustomFilterOnIssues { + this := CreateWorkflowFilterUsingCustomFilterOnIssues{} + return &this +} + +// GetType returns the Type field value +func (o *CreateWorkflowFilterUsingCustomFilterOnIssues) GetType() ENUMISSUES { + if o == nil { + var ret ENUMISSUES + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssues) GetTypeOk() (*ENUMISSUES, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *CreateWorkflowFilterUsingCustomFilterOnIssues) SetType(v ENUMISSUES) { + o.Type = v +} + +// GetFilter returns the Filter field value +func (o *CreateWorkflowFilterUsingCustomFilterOnIssues) GetFilter() CreateWorkflowFilterUsingCustomFilterOnIssuesFilter { + if o == nil { + var ret CreateWorkflowFilterUsingCustomFilterOnIssuesFilter + return ret + } + + return o.Filter +} + +// GetFilterOk returns a tuple with the Filter field value +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssues) GetFilterOk() (*CreateWorkflowFilterUsingCustomFilterOnIssuesFilter, bool) { + if o == nil { + return nil, false + } + return &o.Filter, true +} + +// SetFilter sets field value +func (o *CreateWorkflowFilterUsingCustomFilterOnIssues) SetFilter(v CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) { + o.Filter = v +} + +func (o CreateWorkflowFilterUsingCustomFilterOnIssues) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateWorkflowFilterUsingCustomFilterOnIssues) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["filter"] = o.Filter + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateWorkflowFilterUsingCustomFilterOnIssues) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "filter", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateWorkflowFilterUsingCustomFilterOnIssues := _CreateWorkflowFilterUsingCustomFilterOnIssues{} + + err = json.Unmarshal(data, &varCreateWorkflowFilterUsingCustomFilterOnIssues) + + if err != nil { + return err + } + + *o = CreateWorkflowFilterUsingCustomFilterOnIssues(varCreateWorkflowFilterUsingCustomFilterOnIssues) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "filter") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateWorkflowFilterUsingCustomFilterOnIssues struct { + value *CreateWorkflowFilterUsingCustomFilterOnIssues + isSet bool +} + +func (v NullableCreateWorkflowFilterUsingCustomFilterOnIssues) Get() *CreateWorkflowFilterUsingCustomFilterOnIssues { + return v.value +} + +func (v *NullableCreateWorkflowFilterUsingCustomFilterOnIssues) Set(val *CreateWorkflowFilterUsingCustomFilterOnIssues) { + v.value = val + v.isSet = true +} + +func (v NullableCreateWorkflowFilterUsingCustomFilterOnIssues) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateWorkflowFilterUsingCustomFilterOnIssues) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateWorkflowFilterUsingCustomFilterOnIssues(val *CreateWorkflowFilterUsingCustomFilterOnIssues) *NullableCreateWorkflowFilterUsingCustomFilterOnIssues { + return &NullableCreateWorkflowFilterUsingCustomFilterOnIssues{value: val, isSet: true} +} + +func (v NullableCreateWorkflowFilterUsingCustomFilterOnIssues) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateWorkflowFilterUsingCustomFilterOnIssues) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_workflow_filter_using_custom_filter_on_issues_filter.go b/pkg/api/v3/model_create_workflow_filter_using_custom_filter_on_issues_filter.go new file mode 100644 index 00000000..b8f057e1 --- /dev/null +++ b/pkg/api/v3/model_create_workflow_filter_using_custom_filter_on_issues_filter.go @@ -0,0 +1,1006 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" +) + +// checks if the CreateWorkflowFilterUsingCustomFilterOnIssuesFilter type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateWorkflowFilterUsingCustomFilterOnIssuesFilter{} + +// CreateWorkflowFilterUsingCustomFilterOnIssuesFilter struct for CreateWorkflowFilterUsingCustomFilterOnIssuesFilter +type CreateWorkflowFilterUsingCustomFilterOnIssuesFilter struct { + Severities []ENUMPROPERTIESDATAITEMSPROPERTIESSEVERITY `json:"severities,omitempty"` + Risks []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESRISKSITEMS `json:"risks,omitempty"` + ProjectIds []string `json:"projectIds,omitempty"` + ApplicationIds []string `json:"applicationIds,omitempty"` + AssetIds []string `json:"assetIds,omitempty"` + JiraTicket *bool `json:"jiraTicket,omitempty"` + Search *string `json:"search,omitempty"` + Categories []ENUMPROPERTIESDATAITEMSPROPERTIESCATEGORY `json:"categories,omitempty"` + ScannerKinds []ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS `json:"scannerKinds,omitempty"` + AssetClasses []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESCLASS `json:"assetClasses,omitempty"` + TagsIds []string `json:"tagsIds,omitempty"` + ScanIds []string `json:"scanIds,omitempty"` + Status []ENUMPROPERTIESDATAITEMSPROPERTIESSTATUS `json:"status,omitempty"` + Ids []string `json:"ids,omitempty"` + BlacklistedIds []string `json:"blacklistedIds,omitempty"` + FullNames []string `json:"fullNames,omitempty"` + BlacklistedNames []string `json:"blacklistedNames,omitempty"` + AssetStatuses []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSTATUS `json:"assetStatuses,omitempty"` + AiFalsePositive *bool `json:"aiFalsePositive,omitempty"` + Agentic *bool `json:"agentic,omitempty"` + TargetIds []string `json:"targetIds,omitempty"` + Domains []string `json:"domains,omitempty"` + IgnoreInventory *bool `json:"ignoreInventory,omitempty"` + Ignored *bool `json:"ignored,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateWorkflowFilterUsingCustomFilterOnIssuesFilter CreateWorkflowFilterUsingCustomFilterOnIssuesFilter + +// NewCreateWorkflowFilterUsingCustomFilterOnIssuesFilter instantiates a new CreateWorkflowFilterUsingCustomFilterOnIssuesFilter object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateWorkflowFilterUsingCustomFilterOnIssuesFilter() *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter { + this := CreateWorkflowFilterUsingCustomFilterOnIssuesFilter{} + return &this +} + +// NewCreateWorkflowFilterUsingCustomFilterOnIssuesFilterWithDefaults instantiates a new CreateWorkflowFilterUsingCustomFilterOnIssuesFilter object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateWorkflowFilterUsingCustomFilterOnIssuesFilterWithDefaults() *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter { + this := CreateWorkflowFilterUsingCustomFilterOnIssuesFilter{} + return &this +} + +// GetSeverities returns the Severities field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetSeverities() []ENUMPROPERTIESDATAITEMSPROPERTIESSEVERITY { + if o == nil || IsNil(o.Severities) { + var ret []ENUMPROPERTIESDATAITEMSPROPERTIESSEVERITY + return ret + } + return o.Severities +} + +// GetSeveritiesOk returns a tuple with the Severities field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetSeveritiesOk() ([]ENUMPROPERTIESDATAITEMSPROPERTIESSEVERITY, bool) { + if o == nil || IsNil(o.Severities) { + return nil, false + } + return o.Severities, true +} + +// HasSeverities returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasSeverities() bool { + if o != nil && !IsNil(o.Severities) { + return true + } + + return false +} + +// SetSeverities gets a reference to the given []ENUMPROPERTIESDATAITEMSPROPERTIESSEVERITY and assigns it to the Severities field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetSeverities(v []ENUMPROPERTIESDATAITEMSPROPERTIESSEVERITY) { + o.Severities = v +} + +// GetRisks returns the Risks field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetRisks() []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESRISKSITEMS { + if o == nil || IsNil(o.Risks) { + var ret []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESRISKSITEMS + return ret + } + return o.Risks +} + +// GetRisksOk returns a tuple with the Risks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetRisksOk() ([]ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESRISKSITEMS, bool) { + if o == nil || IsNil(o.Risks) { + return nil, false + } + return o.Risks, true +} + +// HasRisks returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasRisks() bool { + if o != nil && !IsNil(o.Risks) { + return true + } + + return false +} + +// SetRisks gets a reference to the given []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESRISKSITEMS and assigns it to the Risks field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetRisks(v []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESRISKSITEMS) { + o.Risks = v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetProjectIds(v []string) { + o.ProjectIds = v +} + +// GetApplicationIds returns the ApplicationIds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetApplicationIds() []string { + if o == nil || IsNil(o.ApplicationIds) { + var ret []string + return ret + } + return o.ApplicationIds +} + +// GetApplicationIdsOk returns a tuple with the ApplicationIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetApplicationIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ApplicationIds) { + return nil, false + } + return o.ApplicationIds, true +} + +// HasApplicationIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasApplicationIds() bool { + if o != nil && !IsNil(o.ApplicationIds) { + return true + } + + return false +} + +// SetApplicationIds gets a reference to the given []string and assigns it to the ApplicationIds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetApplicationIds(v []string) { + o.ApplicationIds = v +} + +// GetAssetIds returns the AssetIds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetAssetIds() []string { + if o == nil || IsNil(o.AssetIds) { + var ret []string + return ret + } + return o.AssetIds +} + +// GetAssetIdsOk returns a tuple with the AssetIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetAssetIdsOk() ([]string, bool) { + if o == nil || IsNil(o.AssetIds) { + return nil, false + } + return o.AssetIds, true +} + +// HasAssetIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasAssetIds() bool { + if o != nil && !IsNil(o.AssetIds) { + return true + } + + return false +} + +// SetAssetIds gets a reference to the given []string and assigns it to the AssetIds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetAssetIds(v []string) { + o.AssetIds = v +} + +// GetJiraTicket returns the JiraTicket field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetJiraTicket() bool { + if o == nil || IsNil(o.JiraTicket) { + var ret bool + return ret + } + return *o.JiraTicket +} + +// GetJiraTicketOk returns a tuple with the JiraTicket field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetJiraTicketOk() (*bool, bool) { + if o == nil || IsNil(o.JiraTicket) { + return nil, false + } + return o.JiraTicket, true +} + +// HasJiraTicket returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasJiraTicket() bool { + if o != nil && !IsNil(o.JiraTicket) { + return true + } + + return false +} + +// SetJiraTicket gets a reference to the given bool and assigns it to the JiraTicket field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetJiraTicket(v bool) { + o.JiraTicket = &v +} + +// GetSearch returns the Search field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetSearch() string { + if o == nil || IsNil(o.Search) { + var ret string + return ret + } + return *o.Search +} + +// GetSearchOk returns a tuple with the Search field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetSearchOk() (*string, bool) { + if o == nil || IsNil(o.Search) { + return nil, false + } + return o.Search, true +} + +// HasSearch returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasSearch() bool { + if o != nil && !IsNil(o.Search) { + return true + } + + return false +} + +// SetSearch gets a reference to the given string and assigns it to the Search field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetSearch(v string) { + o.Search = &v +} + +// GetCategories returns the Categories field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetCategories() []ENUMPROPERTIESDATAITEMSPROPERTIESCATEGORY { + if o == nil || IsNil(o.Categories) { + var ret []ENUMPROPERTIESDATAITEMSPROPERTIESCATEGORY + return ret + } + return o.Categories +} + +// GetCategoriesOk returns a tuple with the Categories field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetCategoriesOk() ([]ENUMPROPERTIESDATAITEMSPROPERTIESCATEGORY, bool) { + if o == nil || IsNil(o.Categories) { + return nil, false + } + return o.Categories, true +} + +// HasCategories returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasCategories() bool { + if o != nil && !IsNil(o.Categories) { + return true + } + + return false +} + +// SetCategories gets a reference to the given []ENUMPROPERTIESDATAITEMSPROPERTIESCATEGORY and assigns it to the Categories field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetCategories(v []ENUMPROPERTIESDATAITEMSPROPERTIESCATEGORY) { + o.Categories = v +} + +// GetScannerKinds returns the ScannerKinds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetScannerKinds() []ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS { + if o == nil || IsNil(o.ScannerKinds) { + var ret []ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS + return ret + } + return o.ScannerKinds +} + +// GetScannerKindsOk returns a tuple with the ScannerKinds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetScannerKindsOk() ([]ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS, bool) { + if o == nil || IsNil(o.ScannerKinds) { + return nil, false + } + return o.ScannerKinds, true +} + +// HasScannerKinds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasScannerKinds() bool { + if o != nil && !IsNil(o.ScannerKinds) { + return true + } + + return false +} + +// SetScannerKinds gets a reference to the given []ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS and assigns it to the ScannerKinds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetScannerKinds(v []ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS) { + o.ScannerKinds = v +} + +// GetAssetClasses returns the AssetClasses field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetAssetClasses() []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESCLASS { + if o == nil || IsNil(o.AssetClasses) { + var ret []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESCLASS + return ret + } + return o.AssetClasses +} + +// GetAssetClassesOk returns a tuple with the AssetClasses field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetAssetClassesOk() ([]ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESCLASS, bool) { + if o == nil || IsNil(o.AssetClasses) { + return nil, false + } + return o.AssetClasses, true +} + +// HasAssetClasses returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasAssetClasses() bool { + if o != nil && !IsNil(o.AssetClasses) { + return true + } + + return false +} + +// SetAssetClasses gets a reference to the given []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESCLASS and assigns it to the AssetClasses field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetAssetClasses(v []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESCLASS) { + o.AssetClasses = v +} + +// GetTagsIds returns the TagsIds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetTagsIds() []string { + if o == nil || IsNil(o.TagsIds) { + var ret []string + return ret + } + return o.TagsIds +} + +// GetTagsIdsOk returns a tuple with the TagsIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetTagsIdsOk() ([]string, bool) { + if o == nil || IsNil(o.TagsIds) { + return nil, false + } + return o.TagsIds, true +} + +// HasTagsIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasTagsIds() bool { + if o != nil && !IsNil(o.TagsIds) { + return true + } + + return false +} + +// SetTagsIds gets a reference to the given []string and assigns it to the TagsIds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetTagsIds(v []string) { + o.TagsIds = v +} + +// GetScanIds returns the ScanIds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetScanIds() []string { + if o == nil || IsNil(o.ScanIds) { + var ret []string + return ret + } + return o.ScanIds +} + +// GetScanIdsOk returns a tuple with the ScanIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetScanIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ScanIds) { + return nil, false + } + return o.ScanIds, true +} + +// HasScanIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasScanIds() bool { + if o != nil && !IsNil(o.ScanIds) { + return true + } + + return false +} + +// SetScanIds gets a reference to the given []string and assigns it to the ScanIds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetScanIds(v []string) { + o.ScanIds = v +} + +// GetStatus returns the Status field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetStatus() []ENUMPROPERTIESDATAITEMSPROPERTIESSTATUS { + if o == nil || IsNil(o.Status) { + var ret []ENUMPROPERTIESDATAITEMSPROPERTIESSTATUS + return ret + } + return o.Status +} + +// GetStatusOk returns a tuple with the Status field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetStatusOk() ([]ENUMPROPERTIESDATAITEMSPROPERTIESSTATUS, bool) { + if o == nil || IsNil(o.Status) { + return nil, false + } + return o.Status, true +} + +// HasStatus returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasStatus() bool { + if o != nil && !IsNil(o.Status) { + return true + } + + return false +} + +// SetStatus gets a reference to the given []ENUMPROPERTIESDATAITEMSPROPERTIESSTATUS and assigns it to the Status field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetStatus(v []ENUMPROPERTIESDATAITEMSPROPERTIESSTATUS) { + o.Status = v +} + +// GetIds returns the Ids field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetIds() []string { + if o == nil || IsNil(o.Ids) { + var ret []string + return ret + } + return o.Ids +} + +// GetIdsOk returns a tuple with the Ids field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetIdsOk() ([]string, bool) { + if o == nil || IsNil(o.Ids) { + return nil, false + } + return o.Ids, true +} + +// HasIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasIds() bool { + if o != nil && !IsNil(o.Ids) { + return true + } + + return false +} + +// SetIds gets a reference to the given []string and assigns it to the Ids field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetIds(v []string) { + o.Ids = v +} + +// GetBlacklistedIds returns the BlacklistedIds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetBlacklistedIds() []string { + if o == nil || IsNil(o.BlacklistedIds) { + var ret []string + return ret + } + return o.BlacklistedIds +} + +// GetBlacklistedIdsOk returns a tuple with the BlacklistedIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetBlacklistedIdsOk() ([]string, bool) { + if o == nil || IsNil(o.BlacklistedIds) { + return nil, false + } + return o.BlacklistedIds, true +} + +// HasBlacklistedIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasBlacklistedIds() bool { + if o != nil && !IsNil(o.BlacklistedIds) { + return true + } + + return false +} + +// SetBlacklistedIds gets a reference to the given []string and assigns it to the BlacklistedIds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetBlacklistedIds(v []string) { + o.BlacklistedIds = v +} + +// GetFullNames returns the FullNames field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetFullNames() []string { + if o == nil || IsNil(o.FullNames) { + var ret []string + return ret + } + return o.FullNames +} + +// GetFullNamesOk returns a tuple with the FullNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetFullNamesOk() ([]string, bool) { + if o == nil || IsNil(o.FullNames) { + return nil, false + } + return o.FullNames, true +} + +// HasFullNames returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasFullNames() bool { + if o != nil && !IsNil(o.FullNames) { + return true + } + + return false +} + +// SetFullNames gets a reference to the given []string and assigns it to the FullNames field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetFullNames(v []string) { + o.FullNames = v +} + +// GetBlacklistedNames returns the BlacklistedNames field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetBlacklistedNames() []string { + if o == nil || IsNil(o.BlacklistedNames) { + var ret []string + return ret + } + return o.BlacklistedNames +} + +// GetBlacklistedNamesOk returns a tuple with the BlacklistedNames field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetBlacklistedNamesOk() ([]string, bool) { + if o == nil || IsNil(o.BlacklistedNames) { + return nil, false + } + return o.BlacklistedNames, true +} + +// HasBlacklistedNames returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasBlacklistedNames() bool { + if o != nil && !IsNil(o.BlacklistedNames) { + return true + } + + return false +} + +// SetBlacklistedNames gets a reference to the given []string and assigns it to the BlacklistedNames field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetBlacklistedNames(v []string) { + o.BlacklistedNames = v +} + +// GetAssetStatuses returns the AssetStatuses field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetAssetStatuses() []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSTATUS { + if o == nil || IsNil(o.AssetStatuses) { + var ret []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSTATUS + return ret + } + return o.AssetStatuses +} + +// GetAssetStatusesOk returns a tuple with the AssetStatuses field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetAssetStatusesOk() ([]ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSTATUS, bool) { + if o == nil || IsNil(o.AssetStatuses) { + return nil, false + } + return o.AssetStatuses, true +} + +// HasAssetStatuses returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasAssetStatuses() bool { + if o != nil && !IsNil(o.AssetStatuses) { + return true + } + + return false +} + +// SetAssetStatuses gets a reference to the given []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSTATUS and assigns it to the AssetStatuses field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetAssetStatuses(v []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESSTATUS) { + o.AssetStatuses = v +} + +// GetAiFalsePositive returns the AiFalsePositive field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetAiFalsePositive() bool { + if o == nil || IsNil(o.AiFalsePositive) { + var ret bool + return ret + } + return *o.AiFalsePositive +} + +// GetAiFalsePositiveOk returns a tuple with the AiFalsePositive field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetAiFalsePositiveOk() (*bool, bool) { + if o == nil || IsNil(o.AiFalsePositive) { + return nil, false + } + return o.AiFalsePositive, true +} + +// HasAiFalsePositive returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasAiFalsePositive() bool { + if o != nil && !IsNil(o.AiFalsePositive) { + return true + } + + return false +} + +// SetAiFalsePositive gets a reference to the given bool and assigns it to the AiFalsePositive field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetAiFalsePositive(v bool) { + o.AiFalsePositive = &v +} + +// GetAgentic returns the Agentic field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetAgentic() bool { + if o == nil || IsNil(o.Agentic) { + var ret bool + return ret + } + return *o.Agentic +} + +// GetAgenticOk returns a tuple with the Agentic field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetAgenticOk() (*bool, bool) { + if o == nil || IsNil(o.Agentic) { + return nil, false + } + return o.Agentic, true +} + +// HasAgentic returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasAgentic() bool { + if o != nil && !IsNil(o.Agentic) { + return true + } + + return false +} + +// SetAgentic gets a reference to the given bool and assigns it to the Agentic field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetAgentic(v bool) { + o.Agentic = &v +} + +// GetTargetIds returns the TargetIds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetTargetIds() []string { + if o == nil || IsNil(o.TargetIds) { + var ret []string + return ret + } + return o.TargetIds +} + +// GetTargetIdsOk returns a tuple with the TargetIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetTargetIdsOk() ([]string, bool) { + if o == nil || IsNil(o.TargetIds) { + return nil, false + } + return o.TargetIds, true +} + +// HasTargetIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasTargetIds() bool { + if o != nil && !IsNil(o.TargetIds) { + return true + } + + return false +} + +// SetTargetIds gets a reference to the given []string and assigns it to the TargetIds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetTargetIds(v []string) { + o.TargetIds = v +} + +// GetDomains returns the Domains field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetDomains() []string { + if o == nil || IsNil(o.Domains) { + var ret []string + return ret + } + return o.Domains +} + +// GetDomainsOk returns a tuple with the Domains field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetDomainsOk() ([]string, bool) { + if o == nil || IsNil(o.Domains) { + return nil, false + } + return o.Domains, true +} + +// HasDomains returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasDomains() bool { + if o != nil && !IsNil(o.Domains) { + return true + } + + return false +} + +// SetDomains gets a reference to the given []string and assigns it to the Domains field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetDomains(v []string) { + o.Domains = v +} + +// GetIgnoreInventory returns the IgnoreInventory field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetIgnoreInventory() bool { + if o == nil || IsNil(o.IgnoreInventory) { + var ret bool + return ret + } + return *o.IgnoreInventory +} + +// GetIgnoreInventoryOk returns a tuple with the IgnoreInventory field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetIgnoreInventoryOk() (*bool, bool) { + if o == nil || IsNil(o.IgnoreInventory) { + return nil, false + } + return o.IgnoreInventory, true +} + +// HasIgnoreInventory returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasIgnoreInventory() bool { + if o != nil && !IsNil(o.IgnoreInventory) { + return true + } + + return false +} + +// SetIgnoreInventory gets a reference to the given bool and assigns it to the IgnoreInventory field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetIgnoreInventory(v bool) { + o.IgnoreInventory = &v +} + +// GetIgnored returns the Ignored field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetIgnored() bool { + if o == nil || IsNil(o.Ignored) { + var ret bool + return ret + } + return *o.Ignored +} + +// GetIgnoredOk returns a tuple with the Ignored field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) GetIgnoredOk() (*bool, bool) { + if o == nil || IsNil(o.Ignored) { + return nil, false + } + return o.Ignored, true +} + +// HasIgnored returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) HasIgnored() bool { + if o != nil && !IsNil(o.Ignored) { + return true + } + + return false +} + +// SetIgnored gets a reference to the given bool and assigns it to the Ignored field. +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) SetIgnored(v bool) { + o.Ignored = &v +} + +func (o CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Severities) { + toSerialize["severities"] = o.Severities + } + if !IsNil(o.Risks) { + toSerialize["risks"] = o.Risks + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + if !IsNil(o.ApplicationIds) { + toSerialize["applicationIds"] = o.ApplicationIds + } + if !IsNil(o.AssetIds) { + toSerialize["assetIds"] = o.AssetIds + } + if !IsNil(o.JiraTicket) { + toSerialize["jiraTicket"] = o.JiraTicket + } + if !IsNil(o.Search) { + toSerialize["search"] = o.Search + } + if !IsNil(o.Categories) { + toSerialize["categories"] = o.Categories + } + if !IsNil(o.ScannerKinds) { + toSerialize["scannerKinds"] = o.ScannerKinds + } + if !IsNil(o.AssetClasses) { + toSerialize["assetClasses"] = o.AssetClasses + } + if !IsNil(o.TagsIds) { + toSerialize["tagsIds"] = o.TagsIds + } + if !IsNil(o.ScanIds) { + toSerialize["scanIds"] = o.ScanIds + } + if !IsNil(o.Status) { + toSerialize["status"] = o.Status + } + if !IsNil(o.Ids) { + toSerialize["ids"] = o.Ids + } + if !IsNil(o.BlacklistedIds) { + toSerialize["blacklistedIds"] = o.BlacklistedIds + } + if !IsNil(o.FullNames) { + toSerialize["fullNames"] = o.FullNames + } + if !IsNil(o.BlacklistedNames) { + toSerialize["blacklistedNames"] = o.BlacklistedNames + } + if !IsNil(o.AssetStatuses) { + toSerialize["assetStatuses"] = o.AssetStatuses + } + if !IsNil(o.AiFalsePositive) { + toSerialize["aiFalsePositive"] = o.AiFalsePositive + } + if !IsNil(o.Agentic) { + toSerialize["agentic"] = o.Agentic + } + if !IsNil(o.TargetIds) { + toSerialize["targetIds"] = o.TargetIds + } + if !IsNil(o.Domains) { + toSerialize["domains"] = o.Domains + } + if !IsNil(o.IgnoreInventory) { + toSerialize["ignoreInventory"] = o.IgnoreInventory + } + if !IsNil(o.Ignored) { + toSerialize["ignored"] = o.Ignored + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) UnmarshalJSON(data []byte) (err error) { + varCreateWorkflowFilterUsingCustomFilterOnIssuesFilter := _CreateWorkflowFilterUsingCustomFilterOnIssuesFilter{} + + err = json.Unmarshal(data, &varCreateWorkflowFilterUsingCustomFilterOnIssuesFilter) + + if err != nil { + return err + } + + *o = CreateWorkflowFilterUsingCustomFilterOnIssuesFilter(varCreateWorkflowFilterUsingCustomFilterOnIssuesFilter) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "severities") + delete(additionalProperties, "risks") + delete(additionalProperties, "projectIds") + delete(additionalProperties, "applicationIds") + delete(additionalProperties, "assetIds") + delete(additionalProperties, "jiraTicket") + delete(additionalProperties, "search") + delete(additionalProperties, "categories") + delete(additionalProperties, "scannerKinds") + delete(additionalProperties, "assetClasses") + delete(additionalProperties, "tagsIds") + delete(additionalProperties, "scanIds") + delete(additionalProperties, "status") + delete(additionalProperties, "ids") + delete(additionalProperties, "blacklistedIds") + delete(additionalProperties, "fullNames") + delete(additionalProperties, "blacklistedNames") + delete(additionalProperties, "assetStatuses") + delete(additionalProperties, "aiFalsePositive") + delete(additionalProperties, "agentic") + delete(additionalProperties, "targetIds") + delete(additionalProperties, "domains") + delete(additionalProperties, "ignoreInventory") + delete(additionalProperties, "ignored") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateWorkflowFilterUsingCustomFilterOnIssuesFilter struct { + value *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter + isSet bool +} + +func (v NullableCreateWorkflowFilterUsingCustomFilterOnIssuesFilter) Get() *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter { + return v.value +} + +func (v *NullableCreateWorkflowFilterUsingCustomFilterOnIssuesFilter) Set(val *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) { + v.value = val + v.isSet = true +} + +func (v NullableCreateWorkflowFilterUsingCustomFilterOnIssuesFilter) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateWorkflowFilterUsingCustomFilterOnIssuesFilter) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateWorkflowFilterUsingCustomFilterOnIssuesFilter(val *CreateWorkflowFilterUsingCustomFilterOnIssuesFilter) *NullableCreateWorkflowFilterUsingCustomFilterOnIssuesFilter { + return &NullableCreateWorkflowFilterUsingCustomFilterOnIssuesFilter{value: val, isSet: true} +} + +func (v NullableCreateWorkflowFilterUsingCustomFilterOnIssuesFilter) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateWorkflowFilterUsingCustomFilterOnIssuesFilter) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_workflow_filter_using_custom_filter_on_profiles.go b/pkg/api/v3/model_create_workflow_filter_using_custom_filter_on_profiles.go new file mode 100644 index 00000000..3c6ac052 --- /dev/null +++ b/pkg/api/v3/model_create_workflow_filter_using_custom_filter_on_profiles.go @@ -0,0 +1,197 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateWorkflowFilterUsingCustomFilterOnProfiles type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateWorkflowFilterUsingCustomFilterOnProfiles{} + +// CreateWorkflowFilterUsingCustomFilterOnProfiles struct for CreateWorkflowFilterUsingCustomFilterOnProfiles +type CreateWorkflowFilterUsingCustomFilterOnProfiles struct { + Type ENUMPROFILES `json:"type"` + Filter CreateWorkflowFilterUsingCustomFilterOnProfilesFilter `json:"filter"` + AdditionalProperties map[string]interface{} +} + +type _CreateWorkflowFilterUsingCustomFilterOnProfiles CreateWorkflowFilterUsingCustomFilterOnProfiles + +// NewCreateWorkflowFilterUsingCustomFilterOnProfiles instantiates a new CreateWorkflowFilterUsingCustomFilterOnProfiles object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateWorkflowFilterUsingCustomFilterOnProfiles(type_ ENUMPROFILES, filter CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) *CreateWorkflowFilterUsingCustomFilterOnProfiles { + this := CreateWorkflowFilterUsingCustomFilterOnProfiles{} + this.Type = type_ + this.Filter = filter + return &this +} + +// NewCreateWorkflowFilterUsingCustomFilterOnProfilesWithDefaults instantiates a new CreateWorkflowFilterUsingCustomFilterOnProfiles object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateWorkflowFilterUsingCustomFilterOnProfilesWithDefaults() *CreateWorkflowFilterUsingCustomFilterOnProfiles { + this := CreateWorkflowFilterUsingCustomFilterOnProfiles{} + return &this +} + +// GetType returns the Type field value +func (o *CreateWorkflowFilterUsingCustomFilterOnProfiles) GetType() ENUMPROFILES { + if o == nil { + var ret ENUMPROFILES + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfiles) GetTypeOk() (*ENUMPROFILES, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *CreateWorkflowFilterUsingCustomFilterOnProfiles) SetType(v ENUMPROFILES) { + o.Type = v +} + +// GetFilter returns the Filter field value +func (o *CreateWorkflowFilterUsingCustomFilterOnProfiles) GetFilter() CreateWorkflowFilterUsingCustomFilterOnProfilesFilter { + if o == nil { + var ret CreateWorkflowFilterUsingCustomFilterOnProfilesFilter + return ret + } + + return o.Filter +} + +// GetFilterOk returns a tuple with the Filter field value +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfiles) GetFilterOk() (*CreateWorkflowFilterUsingCustomFilterOnProfilesFilter, bool) { + if o == nil { + return nil, false + } + return &o.Filter, true +} + +// SetFilter sets field value +func (o *CreateWorkflowFilterUsingCustomFilterOnProfiles) SetFilter(v CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) { + o.Filter = v +} + +func (o CreateWorkflowFilterUsingCustomFilterOnProfiles) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateWorkflowFilterUsingCustomFilterOnProfiles) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["type"] = o.Type + toSerialize["filter"] = o.Filter + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateWorkflowFilterUsingCustomFilterOnProfiles) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "type", + "filter", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateWorkflowFilterUsingCustomFilterOnProfiles := _CreateWorkflowFilterUsingCustomFilterOnProfiles{} + + err = json.Unmarshal(data, &varCreateWorkflowFilterUsingCustomFilterOnProfiles) + + if err != nil { + return err + } + + *o = CreateWorkflowFilterUsingCustomFilterOnProfiles(varCreateWorkflowFilterUsingCustomFilterOnProfiles) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "type") + delete(additionalProperties, "filter") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateWorkflowFilterUsingCustomFilterOnProfiles struct { + value *CreateWorkflowFilterUsingCustomFilterOnProfiles + isSet bool +} + +func (v NullableCreateWorkflowFilterUsingCustomFilterOnProfiles) Get() *CreateWorkflowFilterUsingCustomFilterOnProfiles { + return v.value +} + +func (v *NullableCreateWorkflowFilterUsingCustomFilterOnProfiles) Set(val *CreateWorkflowFilterUsingCustomFilterOnProfiles) { + v.value = val + v.isSet = true +} + +func (v NullableCreateWorkflowFilterUsingCustomFilterOnProfiles) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateWorkflowFilterUsingCustomFilterOnProfiles) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateWorkflowFilterUsingCustomFilterOnProfiles(val *CreateWorkflowFilterUsingCustomFilterOnProfiles) *NullableCreateWorkflowFilterUsingCustomFilterOnProfiles { + return &NullableCreateWorkflowFilterUsingCustomFilterOnProfiles{value: val, isSet: true} +} + +func (v NullableCreateWorkflowFilterUsingCustomFilterOnProfiles) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateWorkflowFilterUsingCustomFilterOnProfiles) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_workflow_filter_using_custom_filter_on_profiles_filter.go b/pkg/api/v3/model_create_workflow_filter_using_custom_filter_on_profiles_filter.go new file mode 100644 index 00000000..0b6498cc --- /dev/null +++ b/pkg/api/v3/model_create_workflow_filter_using_custom_filter_on_profiles_filter.go @@ -0,0 +1,636 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" +) + +// checks if the CreateWorkflowFilterUsingCustomFilterOnProfilesFilter type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateWorkflowFilterUsingCustomFilterOnProfilesFilter{} + +// CreateWorkflowFilterUsingCustomFilterOnProfilesFilter struct for CreateWorkflowFilterUsingCustomFilterOnProfilesFilter +type CreateWorkflowFilterUsingCustomFilterOnProfilesFilter struct { + Ids []string `json:"ids,omitempty"` + Search *string `json:"search,omitempty"` + Risks []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESRISKSITEMS `json:"risks,omitempty"` + TagIds []string `json:"tagIds,omitempty"` + ProjectIds []string `json:"projectIds,omitempty"` + NoProjects *bool `json:"noProjects,omitempty"` + AssetIds []string `json:"assetIds,omitempty"` + AssetSchemaIds []string `json:"assetSchemaIds,omitempty"` + IssueIds []string `json:"issueIds,omitempty"` + Kinds []ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS `json:"kinds,omitempty"` + Domains []string `json:"domains,omitempty"` + Initiators []ENUMPROPERTIESDATAITEMSPROPERTIESINITIATORSITEMS `json:"initiators,omitempty"` + LastScanStatuses []ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS `json:"lastScanStatuses,omitempty"` + AssetClasses []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESCLASS `json:"assetClasses,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateWorkflowFilterUsingCustomFilterOnProfilesFilter CreateWorkflowFilterUsingCustomFilterOnProfilesFilter + +// NewCreateWorkflowFilterUsingCustomFilterOnProfilesFilter instantiates a new CreateWorkflowFilterUsingCustomFilterOnProfilesFilter object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateWorkflowFilterUsingCustomFilterOnProfilesFilter() *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter { + this := CreateWorkflowFilterUsingCustomFilterOnProfilesFilter{} + return &this +} + +// NewCreateWorkflowFilterUsingCustomFilterOnProfilesFilterWithDefaults instantiates a new CreateWorkflowFilterUsingCustomFilterOnProfilesFilter object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateWorkflowFilterUsingCustomFilterOnProfilesFilterWithDefaults() *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter { + this := CreateWorkflowFilterUsingCustomFilterOnProfilesFilter{} + return &this +} + +// GetIds returns the Ids field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetIds() []string { + if o == nil || IsNil(o.Ids) { + var ret []string + return ret + } + return o.Ids +} + +// GetIdsOk returns a tuple with the Ids field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetIdsOk() ([]string, bool) { + if o == nil || IsNil(o.Ids) { + return nil, false + } + return o.Ids, true +} + +// HasIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) HasIds() bool { + if o != nil && !IsNil(o.Ids) { + return true + } + + return false +} + +// SetIds gets a reference to the given []string and assigns it to the Ids field. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) SetIds(v []string) { + o.Ids = v +} + +// GetSearch returns the Search field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetSearch() string { + if o == nil || IsNil(o.Search) { + var ret string + return ret + } + return *o.Search +} + +// GetSearchOk returns a tuple with the Search field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetSearchOk() (*string, bool) { + if o == nil || IsNil(o.Search) { + return nil, false + } + return o.Search, true +} + +// HasSearch returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) HasSearch() bool { + if o != nil && !IsNil(o.Search) { + return true + } + + return false +} + +// SetSearch gets a reference to the given string and assigns it to the Search field. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) SetSearch(v string) { + o.Search = &v +} + +// GetRisks returns the Risks field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetRisks() []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESRISKSITEMS { + if o == nil || IsNil(o.Risks) { + var ret []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESRISKSITEMS + return ret + } + return o.Risks +} + +// GetRisksOk returns a tuple with the Risks field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetRisksOk() ([]ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESRISKSITEMS, bool) { + if o == nil || IsNil(o.Risks) { + return nil, false + } + return o.Risks, true +} + +// HasRisks returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) HasRisks() bool { + if o != nil && !IsNil(o.Risks) { + return true + } + + return false +} + +// SetRisks gets a reference to the given []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESRISKSITEMS and assigns it to the Risks field. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) SetRisks(v []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESRISKSITEMS) { + o.Risks = v +} + +// GetTagIds returns the TagIds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetTagIds() []string { + if o == nil || IsNil(o.TagIds) { + var ret []string + return ret + } + return o.TagIds +} + +// GetTagIdsOk returns a tuple with the TagIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetTagIdsOk() ([]string, bool) { + if o == nil || IsNil(o.TagIds) { + return nil, false + } + return o.TagIds, true +} + +// HasTagIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) HasTagIds() bool { + if o != nil && !IsNil(o.TagIds) { + return true + } + + return false +} + +// SetTagIds gets a reference to the given []string and assigns it to the TagIds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) SetTagIds(v []string) { + o.TagIds = v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) SetProjectIds(v []string) { + o.ProjectIds = v +} + +// GetNoProjects returns the NoProjects field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetNoProjects() bool { + if o == nil || IsNil(o.NoProjects) { + var ret bool + return ret + } + return *o.NoProjects +} + +// GetNoProjectsOk returns a tuple with the NoProjects field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetNoProjectsOk() (*bool, bool) { + if o == nil || IsNil(o.NoProjects) { + return nil, false + } + return o.NoProjects, true +} + +// HasNoProjects returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) HasNoProjects() bool { + if o != nil && !IsNil(o.NoProjects) { + return true + } + + return false +} + +// SetNoProjects gets a reference to the given bool and assigns it to the NoProjects field. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) SetNoProjects(v bool) { + o.NoProjects = &v +} + +// GetAssetIds returns the AssetIds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetAssetIds() []string { + if o == nil || IsNil(o.AssetIds) { + var ret []string + return ret + } + return o.AssetIds +} + +// GetAssetIdsOk returns a tuple with the AssetIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetAssetIdsOk() ([]string, bool) { + if o == nil || IsNil(o.AssetIds) { + return nil, false + } + return o.AssetIds, true +} + +// HasAssetIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) HasAssetIds() bool { + if o != nil && !IsNil(o.AssetIds) { + return true + } + + return false +} + +// SetAssetIds gets a reference to the given []string and assigns it to the AssetIds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) SetAssetIds(v []string) { + o.AssetIds = v +} + +// GetAssetSchemaIds returns the AssetSchemaIds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetAssetSchemaIds() []string { + if o == nil || IsNil(o.AssetSchemaIds) { + var ret []string + return ret + } + return o.AssetSchemaIds +} + +// GetAssetSchemaIdsOk returns a tuple with the AssetSchemaIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetAssetSchemaIdsOk() ([]string, bool) { + if o == nil || IsNil(o.AssetSchemaIds) { + return nil, false + } + return o.AssetSchemaIds, true +} + +// HasAssetSchemaIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) HasAssetSchemaIds() bool { + if o != nil && !IsNil(o.AssetSchemaIds) { + return true + } + + return false +} + +// SetAssetSchemaIds gets a reference to the given []string and assigns it to the AssetSchemaIds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) SetAssetSchemaIds(v []string) { + o.AssetSchemaIds = v +} + +// GetIssueIds returns the IssueIds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetIssueIds() []string { + if o == nil || IsNil(o.IssueIds) { + var ret []string + return ret + } + return o.IssueIds +} + +// GetIssueIdsOk returns a tuple with the IssueIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetIssueIdsOk() ([]string, bool) { + if o == nil || IsNil(o.IssueIds) { + return nil, false + } + return o.IssueIds, true +} + +// HasIssueIds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) HasIssueIds() bool { + if o != nil && !IsNil(o.IssueIds) { + return true + } + + return false +} + +// SetIssueIds gets a reference to the given []string and assigns it to the IssueIds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) SetIssueIds(v []string) { + o.IssueIds = v +} + +// GetKinds returns the Kinds field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetKinds() []ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS { + if o == nil || IsNil(o.Kinds) { + var ret []ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS + return ret + } + return o.Kinds +} + +// GetKindsOk returns a tuple with the Kinds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetKindsOk() ([]ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS, bool) { + if o == nil || IsNil(o.Kinds) { + return nil, false + } + return o.Kinds, true +} + +// HasKinds returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) HasKinds() bool { + if o != nil && !IsNil(o.Kinds) { + return true + } + + return false +} + +// SetKinds gets a reference to the given []ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS and assigns it to the Kinds field. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) SetKinds(v []ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS) { + o.Kinds = v +} + +// GetDomains returns the Domains field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetDomains() []string { + if o == nil || IsNil(o.Domains) { + var ret []string + return ret + } + return o.Domains +} + +// GetDomainsOk returns a tuple with the Domains field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetDomainsOk() ([]string, bool) { + if o == nil || IsNil(o.Domains) { + return nil, false + } + return o.Domains, true +} + +// HasDomains returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) HasDomains() bool { + if o != nil && !IsNil(o.Domains) { + return true + } + + return false +} + +// SetDomains gets a reference to the given []string and assigns it to the Domains field. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) SetDomains(v []string) { + o.Domains = v +} + +// GetInitiators returns the Initiators field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetInitiators() []ENUMPROPERTIESDATAITEMSPROPERTIESINITIATORSITEMS { + if o == nil || IsNil(o.Initiators) { + var ret []ENUMPROPERTIESDATAITEMSPROPERTIESINITIATORSITEMS + return ret + } + return o.Initiators +} + +// GetInitiatorsOk returns a tuple with the Initiators field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetInitiatorsOk() ([]ENUMPROPERTIESDATAITEMSPROPERTIESINITIATORSITEMS, bool) { + if o == nil || IsNil(o.Initiators) { + return nil, false + } + return o.Initiators, true +} + +// HasInitiators returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) HasInitiators() bool { + if o != nil && !IsNil(o.Initiators) { + return true + } + + return false +} + +// SetInitiators gets a reference to the given []ENUMPROPERTIESDATAITEMSPROPERTIESINITIATORSITEMS and assigns it to the Initiators field. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) SetInitiators(v []ENUMPROPERTIESDATAITEMSPROPERTIESINITIATORSITEMS) { + o.Initiators = v +} + +// GetLastScanStatuses returns the LastScanStatuses field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetLastScanStatuses() []ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS { + if o == nil || IsNil(o.LastScanStatuses) { + var ret []ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS + return ret + } + return o.LastScanStatuses +} + +// GetLastScanStatusesOk returns a tuple with the LastScanStatuses field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetLastScanStatusesOk() ([]ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS, bool) { + if o == nil || IsNil(o.LastScanStatuses) { + return nil, false + } + return o.LastScanStatuses, true +} + +// HasLastScanStatuses returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) HasLastScanStatuses() bool { + if o != nil && !IsNil(o.LastScanStatuses) { + return true + } + + return false +} + +// SetLastScanStatuses gets a reference to the given []ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS and assigns it to the LastScanStatuses field. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) SetLastScanStatuses(v []ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS) { + o.LastScanStatuses = v +} + +// GetAssetClasses returns the AssetClasses field value if set, zero value otherwise. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetAssetClasses() []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESCLASS { + if o == nil || IsNil(o.AssetClasses) { + var ret []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESCLASS + return ret + } + return o.AssetClasses +} + +// GetAssetClassesOk returns a tuple with the AssetClasses field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) GetAssetClassesOk() ([]ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESCLASS, bool) { + if o == nil || IsNil(o.AssetClasses) { + return nil, false + } + return o.AssetClasses, true +} + +// HasAssetClasses returns a boolean if a field has been set. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) HasAssetClasses() bool { + if o != nil && !IsNil(o.AssetClasses) { + return true + } + + return false +} + +// SetAssetClasses gets a reference to the given []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESCLASS and assigns it to the AssetClasses field. +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) SetAssetClasses(v []ENUMPROPERTIESDATAITEMSPROPERTIESASSETPROPERTIESCLASS) { + o.AssetClasses = v +} + +func (o CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Ids) { + toSerialize["ids"] = o.Ids + } + if !IsNil(o.Search) { + toSerialize["search"] = o.Search + } + if !IsNil(o.Risks) { + toSerialize["risks"] = o.Risks + } + if !IsNil(o.TagIds) { + toSerialize["tagIds"] = o.TagIds + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + if !IsNil(o.NoProjects) { + toSerialize["noProjects"] = o.NoProjects + } + if !IsNil(o.AssetIds) { + toSerialize["assetIds"] = o.AssetIds + } + if !IsNil(o.AssetSchemaIds) { + toSerialize["assetSchemaIds"] = o.AssetSchemaIds + } + if !IsNil(o.IssueIds) { + toSerialize["issueIds"] = o.IssueIds + } + if !IsNil(o.Kinds) { + toSerialize["kinds"] = o.Kinds + } + if !IsNil(o.Domains) { + toSerialize["domains"] = o.Domains + } + if !IsNil(o.Initiators) { + toSerialize["initiators"] = o.Initiators + } + if !IsNil(o.LastScanStatuses) { + toSerialize["lastScanStatuses"] = o.LastScanStatuses + } + if !IsNil(o.AssetClasses) { + toSerialize["assetClasses"] = o.AssetClasses + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) UnmarshalJSON(data []byte) (err error) { + varCreateWorkflowFilterUsingCustomFilterOnProfilesFilter := _CreateWorkflowFilterUsingCustomFilterOnProfilesFilter{} + + err = json.Unmarshal(data, &varCreateWorkflowFilterUsingCustomFilterOnProfilesFilter) + + if err != nil { + return err + } + + *o = CreateWorkflowFilterUsingCustomFilterOnProfilesFilter(varCreateWorkflowFilterUsingCustomFilterOnProfilesFilter) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "ids") + delete(additionalProperties, "search") + delete(additionalProperties, "risks") + delete(additionalProperties, "tagIds") + delete(additionalProperties, "projectIds") + delete(additionalProperties, "noProjects") + delete(additionalProperties, "assetIds") + delete(additionalProperties, "assetSchemaIds") + delete(additionalProperties, "issueIds") + delete(additionalProperties, "kinds") + delete(additionalProperties, "domains") + delete(additionalProperties, "initiators") + delete(additionalProperties, "lastScanStatuses") + delete(additionalProperties, "assetClasses") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateWorkflowFilterUsingCustomFilterOnProfilesFilter struct { + value *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter + isSet bool +} + +func (v NullableCreateWorkflowFilterUsingCustomFilterOnProfilesFilter) Get() *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter { + return v.value +} + +func (v *NullableCreateWorkflowFilterUsingCustomFilterOnProfilesFilter) Set(val *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) { + v.value = val + v.isSet = true +} + +func (v NullableCreateWorkflowFilterUsingCustomFilterOnProfilesFilter) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateWorkflowFilterUsingCustomFilterOnProfilesFilter) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateWorkflowFilterUsingCustomFilterOnProfilesFilter(val *CreateWorkflowFilterUsingCustomFilterOnProfilesFilter) *NullableCreateWorkflowFilterUsingCustomFilterOnProfilesFilter { + return &NullableCreateWorkflowFilterUsingCustomFilterOnProfilesFilter{value: val, isSet: true} +} + +func (v NullableCreateWorkflowFilterUsingCustomFilterOnProfilesFilter) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateWorkflowFilterUsingCustomFilterOnProfilesFilter) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_workflow_filter_using_view.go b/pkg/api/v3/model_create_workflow_filter_using_view.go new file mode 100644 index 00000000..813e5d03 --- /dev/null +++ b/pkg/api/v3/model_create_workflow_filter_using_view.go @@ -0,0 +1,168 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateWorkflowFilterUsingView type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateWorkflowFilterUsingView{} + +// CreateWorkflowFilterUsingView struct for CreateWorkflowFilterUsingView +type CreateWorkflowFilterUsingView struct { + ViewId string `json:"viewId"` + AdditionalProperties map[string]interface{} +} + +type _CreateWorkflowFilterUsingView CreateWorkflowFilterUsingView + +// NewCreateWorkflowFilterUsingView instantiates a new CreateWorkflowFilterUsingView object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateWorkflowFilterUsingView(viewId string) *CreateWorkflowFilterUsingView { + this := CreateWorkflowFilterUsingView{} + this.ViewId = viewId + return &this +} + +// NewCreateWorkflowFilterUsingViewWithDefaults instantiates a new CreateWorkflowFilterUsingView object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateWorkflowFilterUsingViewWithDefaults() *CreateWorkflowFilterUsingView { + this := CreateWorkflowFilterUsingView{} + return &this +} + +// GetViewId returns the ViewId field value +func (o *CreateWorkflowFilterUsingView) GetViewId() string { + if o == nil { + var ret string + return ret + } + + return o.ViewId +} + +// GetViewIdOk returns a tuple with the ViewId field value +// and a boolean to check if the value has been set. +func (o *CreateWorkflowFilterUsingView) GetViewIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ViewId, true +} + +// SetViewId sets field value +func (o *CreateWorkflowFilterUsingView) SetViewId(v string) { + o.ViewId = v +} + +func (o CreateWorkflowFilterUsingView) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateWorkflowFilterUsingView) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["viewId"] = o.ViewId + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateWorkflowFilterUsingView) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "viewId", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateWorkflowFilterUsingView := _CreateWorkflowFilterUsingView{} + + err = json.Unmarshal(data, &varCreateWorkflowFilterUsingView) + + if err != nil { + return err + } + + *o = CreateWorkflowFilterUsingView(varCreateWorkflowFilterUsingView) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "viewId") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateWorkflowFilterUsingView struct { + value *CreateWorkflowFilterUsingView + isSet bool +} + +func (v NullableCreateWorkflowFilterUsingView) Get() *CreateWorkflowFilterUsingView { + return v.value +} + +func (v *NullableCreateWorkflowFilterUsingView) Set(val *CreateWorkflowFilterUsingView) { + v.value = val + v.isSet = true +} + +func (v NullableCreateWorkflowFilterUsingView) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateWorkflowFilterUsingView) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateWorkflowFilterUsingView(val *CreateWorkflowFilterUsingView) *NullableCreateWorkflowFilterUsingView { + return &NullableCreateWorkflowFilterUsingView{value: val, isSet: true} +} + +func (v NullableCreateWorkflowFilterUsingView) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateWorkflowFilterUsingView) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_create_workflow_request.go b/pkg/api/v3/model_create_workflow_request.go new file mode 100644 index 00000000..7d0fd506 --- /dev/null +++ b/pkg/api/v3/model_create_workflow_request.go @@ -0,0 +1,362 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateWorkflowRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateWorkflowRequest{} + +// CreateWorkflowRequest struct for CreateWorkflowRequest +type CreateWorkflowRequest struct { + // The organization ID to create the workflow for + OrganizationId string `json:"organizationId"` + // The name of the workflow + Name string `json:"name"` + Trigger ENUMPROPERTIESTRIGGER `json:"trigger"` + // The throttle in milliseconds for the workflow. + ThrottleMs *float32 `json:"throttleMs,omitempty"` + Filters []UpdateWorkflowRequestFiltersInner `json:"filters"` + Actions []UpdateWorkflowRequestActionsInner `json:"actions"` + // Optional list of project IDs to create the integration for + ProjectIds []string `json:"projectIds,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateWorkflowRequest CreateWorkflowRequest + +// NewCreateWorkflowRequest instantiates a new CreateWorkflowRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateWorkflowRequest(organizationId string, name string, trigger ENUMPROPERTIESTRIGGER, filters []UpdateWorkflowRequestFiltersInner, actions []UpdateWorkflowRequestActionsInner) *CreateWorkflowRequest { + this := CreateWorkflowRequest{} + this.OrganizationId = organizationId + this.Name = name + this.Trigger = trigger + this.Filters = filters + this.Actions = actions + return &this +} + +// NewCreateWorkflowRequestWithDefaults instantiates a new CreateWorkflowRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateWorkflowRequestWithDefaults() *CreateWorkflowRequest { + this := CreateWorkflowRequest{} + return &this +} + +// GetOrganizationId returns the OrganizationId field value +func (o *CreateWorkflowRequest) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *CreateWorkflowRequest) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *CreateWorkflowRequest) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetName returns the Name field value +func (o *CreateWorkflowRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateWorkflowRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateWorkflowRequest) SetName(v string) { + o.Name = v +} + +// GetTrigger returns the Trigger field value +func (o *CreateWorkflowRequest) GetTrigger() ENUMPROPERTIESTRIGGER { + if o == nil { + var ret ENUMPROPERTIESTRIGGER + return ret + } + + return o.Trigger +} + +// GetTriggerOk returns a tuple with the Trigger field value +// and a boolean to check if the value has been set. +func (o *CreateWorkflowRequest) GetTriggerOk() (*ENUMPROPERTIESTRIGGER, bool) { + if o == nil { + return nil, false + } + return &o.Trigger, true +} + +// SetTrigger sets field value +func (o *CreateWorkflowRequest) SetTrigger(v ENUMPROPERTIESTRIGGER) { + o.Trigger = v +} + +// GetThrottleMs returns the ThrottleMs field value if set, zero value otherwise. +func (o *CreateWorkflowRequest) GetThrottleMs() float32 { + if o == nil || IsNil(o.ThrottleMs) { + var ret float32 + return ret + } + return *o.ThrottleMs +} + +// GetThrottleMsOk returns a tuple with the ThrottleMs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowRequest) GetThrottleMsOk() (*float32, bool) { + if o == nil || IsNil(o.ThrottleMs) { + return nil, false + } + return o.ThrottleMs, true +} + +// HasThrottleMs returns a boolean if a field has been set. +func (o *CreateWorkflowRequest) HasThrottleMs() bool { + if o != nil && !IsNil(o.ThrottleMs) { + return true + } + + return false +} + +// SetThrottleMs gets a reference to the given float32 and assigns it to the ThrottleMs field. +func (o *CreateWorkflowRequest) SetThrottleMs(v float32) { + o.ThrottleMs = &v +} + +// GetFilters returns the Filters field value +func (o *CreateWorkflowRequest) GetFilters() []UpdateWorkflowRequestFiltersInner { + if o == nil { + var ret []UpdateWorkflowRequestFiltersInner + return ret + } + + return o.Filters +} + +// GetFiltersOk returns a tuple with the Filters field value +// and a boolean to check if the value has been set. +func (o *CreateWorkflowRequest) GetFiltersOk() ([]UpdateWorkflowRequestFiltersInner, bool) { + if o == nil { + return nil, false + } + return o.Filters, true +} + +// SetFilters sets field value +func (o *CreateWorkflowRequest) SetFilters(v []UpdateWorkflowRequestFiltersInner) { + o.Filters = v +} + +// GetActions returns the Actions field value +func (o *CreateWorkflowRequest) GetActions() []UpdateWorkflowRequestActionsInner { + if o == nil { + var ret []UpdateWorkflowRequestActionsInner + return ret + } + + return o.Actions +} + +// GetActionsOk returns a tuple with the Actions field value +// and a boolean to check if the value has been set. +func (o *CreateWorkflowRequest) GetActionsOk() ([]UpdateWorkflowRequestActionsInner, bool) { + if o == nil { + return nil, false + } + return o.Actions, true +} + +// SetActions sets field value +func (o *CreateWorkflowRequest) SetActions(v []UpdateWorkflowRequestActionsInner) { + o.Actions = v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateWorkflowRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateWorkflowRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateWorkflowRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateWorkflowRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o CreateWorkflowRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateWorkflowRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["organizationId"] = o.OrganizationId + toSerialize["name"] = o.Name + toSerialize["trigger"] = o.Trigger + if !IsNil(o.ThrottleMs) { + toSerialize["throttleMs"] = o.ThrottleMs + } + toSerialize["filters"] = o.Filters + toSerialize["actions"] = o.Actions + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateWorkflowRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "organizationId", + "name", + "trigger", + "filters", + "actions", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateWorkflowRequest := _CreateWorkflowRequest{} + + err = json.Unmarshal(data, &varCreateWorkflowRequest) + + if err != nil { + return err + } + + *o = CreateWorkflowRequest(varCreateWorkflowRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "organizationId") + delete(additionalProperties, "name") + delete(additionalProperties, "trigger") + delete(additionalProperties, "throttleMs") + delete(additionalProperties, "filters") + delete(additionalProperties, "actions") + delete(additionalProperties, "projectIds") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateWorkflowRequest struct { + value *CreateWorkflowRequest + isSet bool +} + +func (v NullableCreateWorkflowRequest) Get() *CreateWorkflowRequest { + return v.value +} + +func (v *NullableCreateWorkflowRequest) Set(val *CreateWorkflowRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateWorkflowRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateWorkflowRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateWorkflowRequest(val *CreateWorkflowRequest) *NullableCreateWorkflowRequest { + return &NullableCreateWorkflowRequest{value: val, isSet: true} +} + +func (v NullableCreateWorkflowRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateWorkflowRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createakamai_integration_200_response.go b/pkg/api/v3/model_createakamai_integration_200_response.go new file mode 100644 index 00000000..cb59923c --- /dev/null +++ b/pkg/api/v3/model_createakamai_integration_200_response.go @@ -0,0 +1,551 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "time" + "fmt" +) + +// checks if the CreateakamaiIntegration200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateakamaiIntegration200Response{} + +// CreateakamaiIntegration200Response struct for CreateakamaiIntegration200Response +type CreateakamaiIntegration200Response struct { + // The id of the integration + Id string `json:"id"` + // The name of the integration + Name string `json:"name"` + // The date and time the integration was created + CreatedAt time.Time `json:"createdAt"` + // The date and time the integration was last updated + UpdatedAt time.Time `json:"updatedAt"` + // The date and time the integration is scheduled for deletion + ScheduledForDeletionAt *time.Time `json:"scheduledForDeletionAt,omitempty"` + // The date and time the last pull workflow was executed + LastPullWorkflowAt *time.Time `json:"lastPullWorkflowAt,omitempty"` + Kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND `json:"kind"` + // Whether the integration is valid + Valid bool `json:"valid"` + // The validation errors of the integration + ValidationErrors []string `json:"validationErrors"` + // The id of the organization the integration belongs to + OrganizationId string `json:"organizationId"` + // The projects of the integration + Projects []ListProjects200ResponseDataInner `json:"projects"` + Parameters CreateakamaiIntegrationRequestParameters `json:"parameters"` + Location *LocationDetailed1 `json:"location,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateakamaiIntegration200Response CreateakamaiIntegration200Response + +// NewCreateakamaiIntegration200Response instantiates a new CreateakamaiIntegration200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateakamaiIntegration200Response(id string, name string, createdAt time.Time, updatedAt time.Time, kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND, valid bool, validationErrors []string, organizationId string, projects []ListProjects200ResponseDataInner, parameters CreateakamaiIntegrationRequestParameters) *CreateakamaiIntegration200Response { + this := CreateakamaiIntegration200Response{} + this.Id = id + this.Name = name + this.CreatedAt = createdAt + this.UpdatedAt = updatedAt + this.Kind = kind + this.Valid = valid + this.ValidationErrors = validationErrors + this.OrganizationId = organizationId + this.Projects = projects + this.Parameters = parameters + return &this +} + +// NewCreateakamaiIntegration200ResponseWithDefaults instantiates a new CreateakamaiIntegration200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateakamaiIntegration200ResponseWithDefaults() *CreateakamaiIntegration200Response { + this := CreateakamaiIntegration200Response{} + return &this +} + +// GetId returns the Id field value +func (o *CreateakamaiIntegration200Response) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CreateakamaiIntegration200Response) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CreateakamaiIntegration200Response) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *CreateakamaiIntegration200Response) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateakamaiIntegration200Response) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateakamaiIntegration200Response) SetName(v string) { + o.Name = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *CreateakamaiIntegration200Response) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *CreateakamaiIntegration200Response) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *CreateakamaiIntegration200Response) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *CreateakamaiIntegration200Response) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *CreateakamaiIntegration200Response) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *CreateakamaiIntegration200Response) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +// GetScheduledForDeletionAt returns the ScheduledForDeletionAt field value if set, zero value otherwise. +func (o *CreateakamaiIntegration200Response) GetScheduledForDeletionAt() time.Time { + if o == nil || IsNil(o.ScheduledForDeletionAt) { + var ret time.Time + return ret + } + return *o.ScheduledForDeletionAt +} + +// GetScheduledForDeletionAtOk returns a tuple with the ScheduledForDeletionAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateakamaiIntegration200Response) GetScheduledForDeletionAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.ScheduledForDeletionAt) { + return nil, false + } + return o.ScheduledForDeletionAt, true +} + +// HasScheduledForDeletionAt returns a boolean if a field has been set. +func (o *CreateakamaiIntegration200Response) HasScheduledForDeletionAt() bool { + if o != nil && !IsNil(o.ScheduledForDeletionAt) { + return true + } + + return false +} + +// SetScheduledForDeletionAt gets a reference to the given time.Time and assigns it to the ScheduledForDeletionAt field. +func (o *CreateakamaiIntegration200Response) SetScheduledForDeletionAt(v time.Time) { + o.ScheduledForDeletionAt = &v +} + +// GetLastPullWorkflowAt returns the LastPullWorkflowAt field value if set, zero value otherwise. +func (o *CreateakamaiIntegration200Response) GetLastPullWorkflowAt() time.Time { + if o == nil || IsNil(o.LastPullWorkflowAt) { + var ret time.Time + return ret + } + return *o.LastPullWorkflowAt +} + +// GetLastPullWorkflowAtOk returns a tuple with the LastPullWorkflowAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateakamaiIntegration200Response) GetLastPullWorkflowAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastPullWorkflowAt) { + return nil, false + } + return o.LastPullWorkflowAt, true +} + +// HasLastPullWorkflowAt returns a boolean if a field has been set. +func (o *CreateakamaiIntegration200Response) HasLastPullWorkflowAt() bool { + if o != nil && !IsNil(o.LastPullWorkflowAt) { + return true + } + + return false +} + +// SetLastPullWorkflowAt gets a reference to the given time.Time and assigns it to the LastPullWorkflowAt field. +func (o *CreateakamaiIntegration200Response) SetLastPullWorkflowAt(v time.Time) { + o.LastPullWorkflowAt = &v +} + +// GetKind returns the Kind field value +func (o *CreateakamaiIntegration200Response) GetKind() ENUMPROPERTIESDATAITEMSPROPERTIESKIND { + if o == nil { + var ret ENUMPROPERTIESDATAITEMSPROPERTIESKIND + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *CreateakamaiIntegration200Response) GetKindOk() (*ENUMPROPERTIESDATAITEMSPROPERTIESKIND, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *CreateakamaiIntegration200Response) SetKind(v ENUMPROPERTIESDATAITEMSPROPERTIESKIND) { + o.Kind = v +} + +// GetValid returns the Valid field value +func (o *CreateakamaiIntegration200Response) GetValid() bool { + if o == nil { + var ret bool + return ret + } + + return o.Valid +} + +// GetValidOk returns a tuple with the Valid field value +// and a boolean to check if the value has been set. +func (o *CreateakamaiIntegration200Response) GetValidOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Valid, true +} + +// SetValid sets field value +func (o *CreateakamaiIntegration200Response) SetValid(v bool) { + o.Valid = v +} + +// GetValidationErrors returns the ValidationErrors field value +func (o *CreateakamaiIntegration200Response) GetValidationErrors() []string { + if o == nil { + var ret []string + return ret + } + + return o.ValidationErrors +} + +// GetValidationErrorsOk returns a tuple with the ValidationErrors field value +// and a boolean to check if the value has been set. +func (o *CreateakamaiIntegration200Response) GetValidationErrorsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ValidationErrors, true +} + +// SetValidationErrors sets field value +func (o *CreateakamaiIntegration200Response) SetValidationErrors(v []string) { + o.ValidationErrors = v +} + +// GetOrganizationId returns the OrganizationId field value +func (o *CreateakamaiIntegration200Response) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *CreateakamaiIntegration200Response) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *CreateakamaiIntegration200Response) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetProjects returns the Projects field value +func (o *CreateakamaiIntegration200Response) GetProjects() []ListProjects200ResponseDataInner { + if o == nil { + var ret []ListProjects200ResponseDataInner + return ret + } + + return o.Projects +} + +// GetProjectsOk returns a tuple with the Projects field value +// and a boolean to check if the value has been set. +func (o *CreateakamaiIntegration200Response) GetProjectsOk() ([]ListProjects200ResponseDataInner, bool) { + if o == nil { + return nil, false + } + return o.Projects, true +} + +// SetProjects sets field value +func (o *CreateakamaiIntegration200Response) SetProjects(v []ListProjects200ResponseDataInner) { + o.Projects = v +} + +// GetParameters returns the Parameters field value +func (o *CreateakamaiIntegration200Response) GetParameters() CreateakamaiIntegrationRequestParameters { + if o == nil { + var ret CreateakamaiIntegrationRequestParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreateakamaiIntegration200Response) GetParametersOk() (*CreateakamaiIntegrationRequestParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreateakamaiIntegration200Response) SetParameters(v CreateakamaiIntegrationRequestParameters) { + o.Parameters = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *CreateakamaiIntegration200Response) GetLocation() LocationDetailed1 { + if o == nil || IsNil(o.Location) { + var ret LocationDetailed1 + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateakamaiIntegration200Response) GetLocationOk() (*LocationDetailed1, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *CreateakamaiIntegration200Response) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given LocationDetailed1 and assigns it to the Location field. +func (o *CreateakamaiIntegration200Response) SetLocation(v LocationDetailed1) { + o.Location = &v +} + +func (o CreateakamaiIntegration200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateakamaiIntegration200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["createdAt"] = o.CreatedAt + toSerialize["updatedAt"] = o.UpdatedAt + if !IsNil(o.ScheduledForDeletionAt) { + toSerialize["scheduledForDeletionAt"] = o.ScheduledForDeletionAt + } + if !IsNil(o.LastPullWorkflowAt) { + toSerialize["lastPullWorkflowAt"] = o.LastPullWorkflowAt + } + toSerialize["kind"] = o.Kind + toSerialize["valid"] = o.Valid + toSerialize["validationErrors"] = o.ValidationErrors + toSerialize["organizationId"] = o.OrganizationId + toSerialize["projects"] = o.Projects + toSerialize["parameters"] = o.Parameters + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateakamaiIntegration200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "createdAt", + "updatedAt", + "kind", + "valid", + "validationErrors", + "organizationId", + "projects", + "parameters", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateakamaiIntegration200Response := _CreateakamaiIntegration200Response{} + + err = json.Unmarshal(data, &varCreateakamaiIntegration200Response) + + if err != nil { + return err + } + + *o = CreateakamaiIntegration200Response(varCreateakamaiIntegration200Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "createdAt") + delete(additionalProperties, "updatedAt") + delete(additionalProperties, "scheduledForDeletionAt") + delete(additionalProperties, "lastPullWorkflowAt") + delete(additionalProperties, "kind") + delete(additionalProperties, "valid") + delete(additionalProperties, "validationErrors") + delete(additionalProperties, "organizationId") + delete(additionalProperties, "projects") + delete(additionalProperties, "parameters") + delete(additionalProperties, "location") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateakamaiIntegration200Response struct { + value *CreateakamaiIntegration200Response + isSet bool +} + +func (v NullableCreateakamaiIntegration200Response) Get() *CreateakamaiIntegration200Response { + return v.value +} + +func (v *NullableCreateakamaiIntegration200Response) Set(val *CreateakamaiIntegration200Response) { + v.value = val + v.isSet = true +} + +func (v NullableCreateakamaiIntegration200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateakamaiIntegration200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateakamaiIntegration200Response(val *CreateakamaiIntegration200Response) *NullableCreateakamaiIntegration200Response { + return &NullableCreateakamaiIntegration200Response{value: val, isSet: true} +} + +func (v NullableCreateakamaiIntegration200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateakamaiIntegration200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createakamai_integration_request.go b/pkg/api/v3/model_createakamai_integration_request.go new file mode 100644 index 00000000..dac00d93 --- /dev/null +++ b/pkg/api/v3/model_createakamai_integration_request.go @@ -0,0 +1,304 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateakamaiIntegrationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateakamaiIntegrationRequest{} + +// CreateakamaiIntegrationRequest struct for CreateakamaiIntegrationRequest +type CreateakamaiIntegrationRequest struct { + // The organization ID to create the integration for + OrganizationId string `json:"organizationId"` + // The name of the integration + Name string `json:"name"` + Parameters CreateakamaiIntegrationRequestParameters `json:"parameters"` + // Optional proxy ID to create the integration for + ProxyId *string `json:"proxyId,omitempty"` + // Optional list of project IDs to create the integration for + ProjectIds []string `json:"projectIds,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateakamaiIntegrationRequest CreateakamaiIntegrationRequest + +// NewCreateakamaiIntegrationRequest instantiates a new CreateakamaiIntegrationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateakamaiIntegrationRequest(organizationId string, name string, parameters CreateakamaiIntegrationRequestParameters) *CreateakamaiIntegrationRequest { + this := CreateakamaiIntegrationRequest{} + this.OrganizationId = organizationId + this.Name = name + this.Parameters = parameters + return &this +} + +// NewCreateakamaiIntegrationRequestWithDefaults instantiates a new CreateakamaiIntegrationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateakamaiIntegrationRequestWithDefaults() *CreateakamaiIntegrationRequest { + this := CreateakamaiIntegrationRequest{} + return &this +} + +// GetOrganizationId returns the OrganizationId field value +func (o *CreateakamaiIntegrationRequest) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *CreateakamaiIntegrationRequest) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *CreateakamaiIntegrationRequest) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetName returns the Name field value +func (o *CreateakamaiIntegrationRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateakamaiIntegrationRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateakamaiIntegrationRequest) SetName(v string) { + o.Name = v +} + +// GetParameters returns the Parameters field value +func (o *CreateakamaiIntegrationRequest) GetParameters() CreateakamaiIntegrationRequestParameters { + if o == nil { + var ret CreateakamaiIntegrationRequestParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreateakamaiIntegrationRequest) GetParametersOk() (*CreateakamaiIntegrationRequestParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreateakamaiIntegrationRequest) SetParameters(v CreateakamaiIntegrationRequestParameters) { + o.Parameters = v +} + +// GetProxyId returns the ProxyId field value if set, zero value otherwise. +func (o *CreateakamaiIntegrationRequest) GetProxyId() string { + if o == nil || IsNil(o.ProxyId) { + var ret string + return ret + } + return *o.ProxyId +} + +// GetProxyIdOk returns a tuple with the ProxyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateakamaiIntegrationRequest) GetProxyIdOk() (*string, bool) { + if o == nil || IsNil(o.ProxyId) { + return nil, false + } + return o.ProxyId, true +} + +// HasProxyId returns a boolean if a field has been set. +func (o *CreateakamaiIntegrationRequest) HasProxyId() bool { + if o != nil && !IsNil(o.ProxyId) { + return true + } + + return false +} + +// SetProxyId gets a reference to the given string and assigns it to the ProxyId field. +func (o *CreateakamaiIntegrationRequest) SetProxyId(v string) { + o.ProxyId = &v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateakamaiIntegrationRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateakamaiIntegrationRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateakamaiIntegrationRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateakamaiIntegrationRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o CreateakamaiIntegrationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateakamaiIntegrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["organizationId"] = o.OrganizationId + toSerialize["name"] = o.Name + toSerialize["parameters"] = o.Parameters + if !IsNil(o.ProxyId) { + toSerialize["proxyId"] = o.ProxyId + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateakamaiIntegrationRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "organizationId", + "name", + "parameters", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateakamaiIntegrationRequest := _CreateakamaiIntegrationRequest{} + + err = json.Unmarshal(data, &varCreateakamaiIntegrationRequest) + + if err != nil { + return err + } + + *o = CreateakamaiIntegrationRequest(varCreateakamaiIntegrationRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "organizationId") + delete(additionalProperties, "name") + delete(additionalProperties, "parameters") + delete(additionalProperties, "proxyId") + delete(additionalProperties, "projectIds") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateakamaiIntegrationRequest struct { + value *CreateakamaiIntegrationRequest + isSet bool +} + +func (v NullableCreateakamaiIntegrationRequest) Get() *CreateakamaiIntegrationRequest { + return v.value +} + +func (v *NullableCreateakamaiIntegrationRequest) Set(val *CreateakamaiIntegrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateakamaiIntegrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateakamaiIntegrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateakamaiIntegrationRequest(val *CreateakamaiIntegrationRequest) *NullableCreateakamaiIntegrationRequest { + return &NullableCreateakamaiIntegrationRequest{value: val, isSet: true} +} + +func (v NullableCreateakamaiIntegrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateakamaiIntegrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createakamai_integration_request_parameters.go b/pkg/api/v3/model_createakamai_integration_request_parameters.go new file mode 100644 index 00000000..d2049623 --- /dev/null +++ b/pkg/api/v3/model_createakamai_integration_request_parameters.go @@ -0,0 +1,255 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateakamaiIntegrationRequestParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateakamaiIntegrationRequestParameters{} + +// CreateakamaiIntegrationRequestParameters The parameters of the integration +type CreateakamaiIntegrationRequestParameters struct { + ClientSecret string `json:"client_secret"` + Host string `json:"host"` + AccessToken string `json:"access_token"` + ClientToken string `json:"client_token"` + AdditionalProperties map[string]interface{} +} + +type _CreateakamaiIntegrationRequestParameters CreateakamaiIntegrationRequestParameters + +// NewCreateakamaiIntegrationRequestParameters instantiates a new CreateakamaiIntegrationRequestParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateakamaiIntegrationRequestParameters(clientSecret string, host string, accessToken string, clientToken string) *CreateakamaiIntegrationRequestParameters { + this := CreateakamaiIntegrationRequestParameters{} + this.ClientSecret = clientSecret + this.Host = host + this.AccessToken = accessToken + this.ClientToken = clientToken + return &this +} + +// NewCreateakamaiIntegrationRequestParametersWithDefaults instantiates a new CreateakamaiIntegrationRequestParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateakamaiIntegrationRequestParametersWithDefaults() *CreateakamaiIntegrationRequestParameters { + this := CreateakamaiIntegrationRequestParameters{} + return &this +} + +// GetClientSecret returns the ClientSecret field value +func (o *CreateakamaiIntegrationRequestParameters) GetClientSecret() string { + if o == nil { + var ret string + return ret + } + + return o.ClientSecret +} + +// GetClientSecretOk returns a tuple with the ClientSecret field value +// and a boolean to check if the value has been set. +func (o *CreateakamaiIntegrationRequestParameters) GetClientSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientSecret, true +} + +// SetClientSecret sets field value +func (o *CreateakamaiIntegrationRequestParameters) SetClientSecret(v string) { + o.ClientSecret = v +} + +// GetHost returns the Host field value +func (o *CreateakamaiIntegrationRequestParameters) GetHost() string { + if o == nil { + var ret string + return ret + } + + return o.Host +} + +// GetHostOk returns a tuple with the Host field value +// and a boolean to check if the value has been set. +func (o *CreateakamaiIntegrationRequestParameters) GetHostOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Host, true +} + +// SetHost sets field value +func (o *CreateakamaiIntegrationRequestParameters) SetHost(v string) { + o.Host = v +} + +// GetAccessToken returns the AccessToken field value +func (o *CreateakamaiIntegrationRequestParameters) GetAccessToken() string { + if o == nil { + var ret string + return ret + } + + return o.AccessToken +} + +// GetAccessTokenOk returns a tuple with the AccessToken field value +// and a boolean to check if the value has been set. +func (o *CreateakamaiIntegrationRequestParameters) GetAccessTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccessToken, true +} + +// SetAccessToken sets field value +func (o *CreateakamaiIntegrationRequestParameters) SetAccessToken(v string) { + o.AccessToken = v +} + +// GetClientToken returns the ClientToken field value +func (o *CreateakamaiIntegrationRequestParameters) GetClientToken() string { + if o == nil { + var ret string + return ret + } + + return o.ClientToken +} + +// GetClientTokenOk returns a tuple with the ClientToken field value +// and a boolean to check if the value has been set. +func (o *CreateakamaiIntegrationRequestParameters) GetClientTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientToken, true +} + +// SetClientToken sets field value +func (o *CreateakamaiIntegrationRequestParameters) SetClientToken(v string) { + o.ClientToken = v +} + +func (o CreateakamaiIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateakamaiIntegrationRequestParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["client_secret"] = o.ClientSecret + toSerialize["host"] = o.Host + toSerialize["access_token"] = o.AccessToken + toSerialize["client_token"] = o.ClientToken + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateakamaiIntegrationRequestParameters) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "client_secret", + "host", + "access_token", + "client_token", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateakamaiIntegrationRequestParameters := _CreateakamaiIntegrationRequestParameters{} + + err = json.Unmarshal(data, &varCreateakamaiIntegrationRequestParameters) + + if err != nil { + return err + } + + *o = CreateakamaiIntegrationRequestParameters(varCreateakamaiIntegrationRequestParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "client_secret") + delete(additionalProperties, "host") + delete(additionalProperties, "access_token") + delete(additionalProperties, "client_token") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateakamaiIntegrationRequestParameters struct { + value *CreateakamaiIntegrationRequestParameters + isSet bool +} + +func (v NullableCreateakamaiIntegrationRequestParameters) Get() *CreateakamaiIntegrationRequestParameters { + return v.value +} + +func (v *NullableCreateakamaiIntegrationRequestParameters) Set(val *CreateakamaiIntegrationRequestParameters) { + v.value = val + v.isSet = true +} + +func (v NullableCreateakamaiIntegrationRequestParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateakamaiIntegrationRequestParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateakamaiIntegrationRequestParameters(val *CreateakamaiIntegrationRequestParameters) *NullableCreateakamaiIntegrationRequestParameters { + return &NullableCreateakamaiIntegrationRequestParameters{value: val, isSet: true} +} + +func (v NullableCreateakamaiIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateakamaiIntegrationRequestParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createapigee_integration_200_response.go b/pkg/api/v3/model_createapigee_integration_200_response.go new file mode 100644 index 00000000..31f50dd5 --- /dev/null +++ b/pkg/api/v3/model_createapigee_integration_200_response.go @@ -0,0 +1,551 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "time" + "fmt" +) + +// checks if the CreateapigeeIntegration200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateapigeeIntegration200Response{} + +// CreateapigeeIntegration200Response struct for CreateapigeeIntegration200Response +type CreateapigeeIntegration200Response struct { + // The id of the integration + Id string `json:"id"` + // The name of the integration + Name string `json:"name"` + // The date and time the integration was created + CreatedAt time.Time `json:"createdAt"` + // The date and time the integration was last updated + UpdatedAt time.Time `json:"updatedAt"` + // The date and time the integration is scheduled for deletion + ScheduledForDeletionAt *time.Time `json:"scheduledForDeletionAt,omitempty"` + // The date and time the last pull workflow was executed + LastPullWorkflowAt *time.Time `json:"lastPullWorkflowAt,omitempty"` + Kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND `json:"kind"` + // Whether the integration is valid + Valid bool `json:"valid"` + // The validation errors of the integration + ValidationErrors []string `json:"validationErrors"` + // The id of the organization the integration belongs to + OrganizationId string `json:"organizationId"` + // The projects of the integration + Projects []ListProjects200ResponseDataInner `json:"projects"` + Parameters CreateapigeeIntegrationRequestParameters `json:"parameters"` + Location *LocationDetailed1 `json:"location,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateapigeeIntegration200Response CreateapigeeIntegration200Response + +// NewCreateapigeeIntegration200Response instantiates a new CreateapigeeIntegration200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateapigeeIntegration200Response(id string, name string, createdAt time.Time, updatedAt time.Time, kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND, valid bool, validationErrors []string, organizationId string, projects []ListProjects200ResponseDataInner, parameters CreateapigeeIntegrationRequestParameters) *CreateapigeeIntegration200Response { + this := CreateapigeeIntegration200Response{} + this.Id = id + this.Name = name + this.CreatedAt = createdAt + this.UpdatedAt = updatedAt + this.Kind = kind + this.Valid = valid + this.ValidationErrors = validationErrors + this.OrganizationId = organizationId + this.Projects = projects + this.Parameters = parameters + return &this +} + +// NewCreateapigeeIntegration200ResponseWithDefaults instantiates a new CreateapigeeIntegration200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateapigeeIntegration200ResponseWithDefaults() *CreateapigeeIntegration200Response { + this := CreateapigeeIntegration200Response{} + return &this +} + +// GetId returns the Id field value +func (o *CreateapigeeIntegration200Response) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegration200Response) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CreateapigeeIntegration200Response) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *CreateapigeeIntegration200Response) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegration200Response) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateapigeeIntegration200Response) SetName(v string) { + o.Name = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *CreateapigeeIntegration200Response) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegration200Response) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *CreateapigeeIntegration200Response) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *CreateapigeeIntegration200Response) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegration200Response) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *CreateapigeeIntegration200Response) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +// GetScheduledForDeletionAt returns the ScheduledForDeletionAt field value if set, zero value otherwise. +func (o *CreateapigeeIntegration200Response) GetScheduledForDeletionAt() time.Time { + if o == nil || IsNil(o.ScheduledForDeletionAt) { + var ret time.Time + return ret + } + return *o.ScheduledForDeletionAt +} + +// GetScheduledForDeletionAtOk returns a tuple with the ScheduledForDeletionAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegration200Response) GetScheduledForDeletionAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.ScheduledForDeletionAt) { + return nil, false + } + return o.ScheduledForDeletionAt, true +} + +// HasScheduledForDeletionAt returns a boolean if a field has been set. +func (o *CreateapigeeIntegration200Response) HasScheduledForDeletionAt() bool { + if o != nil && !IsNil(o.ScheduledForDeletionAt) { + return true + } + + return false +} + +// SetScheduledForDeletionAt gets a reference to the given time.Time and assigns it to the ScheduledForDeletionAt field. +func (o *CreateapigeeIntegration200Response) SetScheduledForDeletionAt(v time.Time) { + o.ScheduledForDeletionAt = &v +} + +// GetLastPullWorkflowAt returns the LastPullWorkflowAt field value if set, zero value otherwise. +func (o *CreateapigeeIntegration200Response) GetLastPullWorkflowAt() time.Time { + if o == nil || IsNil(o.LastPullWorkflowAt) { + var ret time.Time + return ret + } + return *o.LastPullWorkflowAt +} + +// GetLastPullWorkflowAtOk returns a tuple with the LastPullWorkflowAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegration200Response) GetLastPullWorkflowAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastPullWorkflowAt) { + return nil, false + } + return o.LastPullWorkflowAt, true +} + +// HasLastPullWorkflowAt returns a boolean if a field has been set. +func (o *CreateapigeeIntegration200Response) HasLastPullWorkflowAt() bool { + if o != nil && !IsNil(o.LastPullWorkflowAt) { + return true + } + + return false +} + +// SetLastPullWorkflowAt gets a reference to the given time.Time and assigns it to the LastPullWorkflowAt field. +func (o *CreateapigeeIntegration200Response) SetLastPullWorkflowAt(v time.Time) { + o.LastPullWorkflowAt = &v +} + +// GetKind returns the Kind field value +func (o *CreateapigeeIntegration200Response) GetKind() ENUMPROPERTIESDATAITEMSPROPERTIESKIND { + if o == nil { + var ret ENUMPROPERTIESDATAITEMSPROPERTIESKIND + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegration200Response) GetKindOk() (*ENUMPROPERTIESDATAITEMSPROPERTIESKIND, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *CreateapigeeIntegration200Response) SetKind(v ENUMPROPERTIESDATAITEMSPROPERTIESKIND) { + o.Kind = v +} + +// GetValid returns the Valid field value +func (o *CreateapigeeIntegration200Response) GetValid() bool { + if o == nil { + var ret bool + return ret + } + + return o.Valid +} + +// GetValidOk returns a tuple with the Valid field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegration200Response) GetValidOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Valid, true +} + +// SetValid sets field value +func (o *CreateapigeeIntegration200Response) SetValid(v bool) { + o.Valid = v +} + +// GetValidationErrors returns the ValidationErrors field value +func (o *CreateapigeeIntegration200Response) GetValidationErrors() []string { + if o == nil { + var ret []string + return ret + } + + return o.ValidationErrors +} + +// GetValidationErrorsOk returns a tuple with the ValidationErrors field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegration200Response) GetValidationErrorsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ValidationErrors, true +} + +// SetValidationErrors sets field value +func (o *CreateapigeeIntegration200Response) SetValidationErrors(v []string) { + o.ValidationErrors = v +} + +// GetOrganizationId returns the OrganizationId field value +func (o *CreateapigeeIntegration200Response) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegration200Response) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *CreateapigeeIntegration200Response) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetProjects returns the Projects field value +func (o *CreateapigeeIntegration200Response) GetProjects() []ListProjects200ResponseDataInner { + if o == nil { + var ret []ListProjects200ResponseDataInner + return ret + } + + return o.Projects +} + +// GetProjectsOk returns a tuple with the Projects field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegration200Response) GetProjectsOk() ([]ListProjects200ResponseDataInner, bool) { + if o == nil { + return nil, false + } + return o.Projects, true +} + +// SetProjects sets field value +func (o *CreateapigeeIntegration200Response) SetProjects(v []ListProjects200ResponseDataInner) { + o.Projects = v +} + +// GetParameters returns the Parameters field value +func (o *CreateapigeeIntegration200Response) GetParameters() CreateapigeeIntegrationRequestParameters { + if o == nil { + var ret CreateapigeeIntegrationRequestParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegration200Response) GetParametersOk() (*CreateapigeeIntegrationRequestParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreateapigeeIntegration200Response) SetParameters(v CreateapigeeIntegrationRequestParameters) { + o.Parameters = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *CreateapigeeIntegration200Response) GetLocation() LocationDetailed1 { + if o == nil || IsNil(o.Location) { + var ret LocationDetailed1 + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegration200Response) GetLocationOk() (*LocationDetailed1, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *CreateapigeeIntegration200Response) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given LocationDetailed1 and assigns it to the Location field. +func (o *CreateapigeeIntegration200Response) SetLocation(v LocationDetailed1) { + o.Location = &v +} + +func (o CreateapigeeIntegration200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateapigeeIntegration200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["createdAt"] = o.CreatedAt + toSerialize["updatedAt"] = o.UpdatedAt + if !IsNil(o.ScheduledForDeletionAt) { + toSerialize["scheduledForDeletionAt"] = o.ScheduledForDeletionAt + } + if !IsNil(o.LastPullWorkflowAt) { + toSerialize["lastPullWorkflowAt"] = o.LastPullWorkflowAt + } + toSerialize["kind"] = o.Kind + toSerialize["valid"] = o.Valid + toSerialize["validationErrors"] = o.ValidationErrors + toSerialize["organizationId"] = o.OrganizationId + toSerialize["projects"] = o.Projects + toSerialize["parameters"] = o.Parameters + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateapigeeIntegration200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "createdAt", + "updatedAt", + "kind", + "valid", + "validationErrors", + "organizationId", + "projects", + "parameters", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateapigeeIntegration200Response := _CreateapigeeIntegration200Response{} + + err = json.Unmarshal(data, &varCreateapigeeIntegration200Response) + + if err != nil { + return err + } + + *o = CreateapigeeIntegration200Response(varCreateapigeeIntegration200Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "createdAt") + delete(additionalProperties, "updatedAt") + delete(additionalProperties, "scheduledForDeletionAt") + delete(additionalProperties, "lastPullWorkflowAt") + delete(additionalProperties, "kind") + delete(additionalProperties, "valid") + delete(additionalProperties, "validationErrors") + delete(additionalProperties, "organizationId") + delete(additionalProperties, "projects") + delete(additionalProperties, "parameters") + delete(additionalProperties, "location") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateapigeeIntegration200Response struct { + value *CreateapigeeIntegration200Response + isSet bool +} + +func (v NullableCreateapigeeIntegration200Response) Get() *CreateapigeeIntegration200Response { + return v.value +} + +func (v *NullableCreateapigeeIntegration200Response) Set(val *CreateapigeeIntegration200Response) { + v.value = val + v.isSet = true +} + +func (v NullableCreateapigeeIntegration200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateapigeeIntegration200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateapigeeIntegration200Response(val *CreateapigeeIntegration200Response) *NullableCreateapigeeIntegration200Response { + return &NullableCreateapigeeIntegration200Response{value: val, isSet: true} +} + +func (v NullableCreateapigeeIntegration200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateapigeeIntegration200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createapigee_integration_request.go b/pkg/api/v3/model_createapigee_integration_request.go new file mode 100644 index 00000000..292eccfe --- /dev/null +++ b/pkg/api/v3/model_createapigee_integration_request.go @@ -0,0 +1,304 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateapigeeIntegrationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateapigeeIntegrationRequest{} + +// CreateapigeeIntegrationRequest struct for CreateapigeeIntegrationRequest +type CreateapigeeIntegrationRequest struct { + // The organization ID to create the integration for + OrganizationId string `json:"organizationId"` + // The name of the integration + Name string `json:"name"` + Parameters CreateapigeeIntegrationRequestParameters `json:"parameters"` + // Optional proxy ID to create the integration for + ProxyId *string `json:"proxyId,omitempty"` + // Optional list of project IDs to create the integration for + ProjectIds []string `json:"projectIds,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateapigeeIntegrationRequest CreateapigeeIntegrationRequest + +// NewCreateapigeeIntegrationRequest instantiates a new CreateapigeeIntegrationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateapigeeIntegrationRequest(organizationId string, name string, parameters CreateapigeeIntegrationRequestParameters) *CreateapigeeIntegrationRequest { + this := CreateapigeeIntegrationRequest{} + this.OrganizationId = organizationId + this.Name = name + this.Parameters = parameters + return &this +} + +// NewCreateapigeeIntegrationRequestWithDefaults instantiates a new CreateapigeeIntegrationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateapigeeIntegrationRequestWithDefaults() *CreateapigeeIntegrationRequest { + this := CreateapigeeIntegrationRequest{} + return &this +} + +// GetOrganizationId returns the OrganizationId field value +func (o *CreateapigeeIntegrationRequest) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegrationRequest) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *CreateapigeeIntegrationRequest) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetName returns the Name field value +func (o *CreateapigeeIntegrationRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegrationRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateapigeeIntegrationRequest) SetName(v string) { + o.Name = v +} + +// GetParameters returns the Parameters field value +func (o *CreateapigeeIntegrationRequest) GetParameters() CreateapigeeIntegrationRequestParameters { + if o == nil { + var ret CreateapigeeIntegrationRequestParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegrationRequest) GetParametersOk() (*CreateapigeeIntegrationRequestParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreateapigeeIntegrationRequest) SetParameters(v CreateapigeeIntegrationRequestParameters) { + o.Parameters = v +} + +// GetProxyId returns the ProxyId field value if set, zero value otherwise. +func (o *CreateapigeeIntegrationRequest) GetProxyId() string { + if o == nil || IsNil(o.ProxyId) { + var ret string + return ret + } + return *o.ProxyId +} + +// GetProxyIdOk returns a tuple with the ProxyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegrationRequest) GetProxyIdOk() (*string, bool) { + if o == nil || IsNil(o.ProxyId) { + return nil, false + } + return o.ProxyId, true +} + +// HasProxyId returns a boolean if a field has been set. +func (o *CreateapigeeIntegrationRequest) HasProxyId() bool { + if o != nil && !IsNil(o.ProxyId) { + return true + } + + return false +} + +// SetProxyId gets a reference to the given string and assigns it to the ProxyId field. +func (o *CreateapigeeIntegrationRequest) SetProxyId(v string) { + o.ProxyId = &v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateapigeeIntegrationRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegrationRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateapigeeIntegrationRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateapigeeIntegrationRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o CreateapigeeIntegrationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateapigeeIntegrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["organizationId"] = o.OrganizationId + toSerialize["name"] = o.Name + toSerialize["parameters"] = o.Parameters + if !IsNil(o.ProxyId) { + toSerialize["proxyId"] = o.ProxyId + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateapigeeIntegrationRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "organizationId", + "name", + "parameters", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateapigeeIntegrationRequest := _CreateapigeeIntegrationRequest{} + + err = json.Unmarshal(data, &varCreateapigeeIntegrationRequest) + + if err != nil { + return err + } + + *o = CreateapigeeIntegrationRequest(varCreateapigeeIntegrationRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "organizationId") + delete(additionalProperties, "name") + delete(additionalProperties, "parameters") + delete(additionalProperties, "proxyId") + delete(additionalProperties, "projectIds") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateapigeeIntegrationRequest struct { + value *CreateapigeeIntegrationRequest + isSet bool +} + +func (v NullableCreateapigeeIntegrationRequest) Get() *CreateapigeeIntegrationRequest { + return v.value +} + +func (v *NullableCreateapigeeIntegrationRequest) Set(val *CreateapigeeIntegrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateapigeeIntegrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateapigeeIntegrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateapigeeIntegrationRequest(val *CreateapigeeIntegrationRequest) *NullableCreateapigeeIntegrationRequest { + return &NullableCreateapigeeIntegrationRequest{value: val, isSet: true} +} + +func (v NullableCreateapigeeIntegrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateapigeeIntegrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createapigee_integration_request_parameters.go b/pkg/api/v3/model_createapigee_integration_request_parameters.go new file mode 100644 index 00000000..976be4ba --- /dev/null +++ b/pkg/api/v3/model_createapigee_integration_request_parameters.go @@ -0,0 +1,458 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateapigeeIntegrationRequestParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateapigeeIntegrationRequestParameters{} + +// CreateapigeeIntegrationRequestParameters The parameters of the integration +type CreateapigeeIntegrationRequestParameters struct { + AuthProviderX509CertUrl string `json:"auth_provider_x509_cert_url"` + AuthUri string `json:"auth_uri"` + ClientEmail string `json:"client_email"` + ClientId string `json:"client_id"` + ClientX509CertUrl string `json:"client_x509_cert_url"` + PrivateKey string `json:"private_key"` + PrivateKeyId string `json:"private_key_id"` + ProjectId string `json:"project_id"` + TokenUri string `json:"token_uri"` + Type string `json:"type"` + UniverseDomain string `json:"universe_domain"` + AdditionalProperties map[string]interface{} +} + +type _CreateapigeeIntegrationRequestParameters CreateapigeeIntegrationRequestParameters + +// NewCreateapigeeIntegrationRequestParameters instantiates a new CreateapigeeIntegrationRequestParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateapigeeIntegrationRequestParameters(authProviderX509CertUrl string, authUri string, clientEmail string, clientId string, clientX509CertUrl string, privateKey string, privateKeyId string, projectId string, tokenUri string, type_ string, universeDomain string) *CreateapigeeIntegrationRequestParameters { + this := CreateapigeeIntegrationRequestParameters{} + this.AuthProviderX509CertUrl = authProviderX509CertUrl + this.AuthUri = authUri + this.ClientEmail = clientEmail + this.ClientId = clientId + this.ClientX509CertUrl = clientX509CertUrl + this.PrivateKey = privateKey + this.PrivateKeyId = privateKeyId + this.ProjectId = projectId + this.TokenUri = tokenUri + this.Type = type_ + this.UniverseDomain = universeDomain + return &this +} + +// NewCreateapigeeIntegrationRequestParametersWithDefaults instantiates a new CreateapigeeIntegrationRequestParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateapigeeIntegrationRequestParametersWithDefaults() *CreateapigeeIntegrationRequestParameters { + this := CreateapigeeIntegrationRequestParameters{} + return &this +} + +// GetAuthProviderX509CertUrl returns the AuthProviderX509CertUrl field value +func (o *CreateapigeeIntegrationRequestParameters) GetAuthProviderX509CertUrl() string { + if o == nil { + var ret string + return ret + } + + return o.AuthProviderX509CertUrl +} + +// GetAuthProviderX509CertUrlOk returns a tuple with the AuthProviderX509CertUrl field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegrationRequestParameters) GetAuthProviderX509CertUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AuthProviderX509CertUrl, true +} + +// SetAuthProviderX509CertUrl sets field value +func (o *CreateapigeeIntegrationRequestParameters) SetAuthProviderX509CertUrl(v string) { + o.AuthProviderX509CertUrl = v +} + +// GetAuthUri returns the AuthUri field value +func (o *CreateapigeeIntegrationRequestParameters) GetAuthUri() string { + if o == nil { + var ret string + return ret + } + + return o.AuthUri +} + +// GetAuthUriOk returns a tuple with the AuthUri field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegrationRequestParameters) GetAuthUriOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AuthUri, true +} + +// SetAuthUri sets field value +func (o *CreateapigeeIntegrationRequestParameters) SetAuthUri(v string) { + o.AuthUri = v +} + +// GetClientEmail returns the ClientEmail field value +func (o *CreateapigeeIntegrationRequestParameters) GetClientEmail() string { + if o == nil { + var ret string + return ret + } + + return o.ClientEmail +} + +// GetClientEmailOk returns a tuple with the ClientEmail field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegrationRequestParameters) GetClientEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientEmail, true +} + +// SetClientEmail sets field value +func (o *CreateapigeeIntegrationRequestParameters) SetClientEmail(v string) { + o.ClientEmail = v +} + +// GetClientId returns the ClientId field value +func (o *CreateapigeeIntegrationRequestParameters) GetClientId() string { + if o == nil { + var ret string + return ret + } + + return o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegrationRequestParameters) GetClientIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientId, true +} + +// SetClientId sets field value +func (o *CreateapigeeIntegrationRequestParameters) SetClientId(v string) { + o.ClientId = v +} + +// GetClientX509CertUrl returns the ClientX509CertUrl field value +func (o *CreateapigeeIntegrationRequestParameters) GetClientX509CertUrl() string { + if o == nil { + var ret string + return ret + } + + return o.ClientX509CertUrl +} + +// GetClientX509CertUrlOk returns a tuple with the ClientX509CertUrl field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegrationRequestParameters) GetClientX509CertUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientX509CertUrl, true +} + +// SetClientX509CertUrl sets field value +func (o *CreateapigeeIntegrationRequestParameters) SetClientX509CertUrl(v string) { + o.ClientX509CertUrl = v +} + +// GetPrivateKey returns the PrivateKey field value +func (o *CreateapigeeIntegrationRequestParameters) GetPrivateKey() string { + if o == nil { + var ret string + return ret + } + + return o.PrivateKey +} + +// GetPrivateKeyOk returns a tuple with the PrivateKey field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegrationRequestParameters) GetPrivateKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PrivateKey, true +} + +// SetPrivateKey sets field value +func (o *CreateapigeeIntegrationRequestParameters) SetPrivateKey(v string) { + o.PrivateKey = v +} + +// GetPrivateKeyId returns the PrivateKeyId field value +func (o *CreateapigeeIntegrationRequestParameters) GetPrivateKeyId() string { + if o == nil { + var ret string + return ret + } + + return o.PrivateKeyId +} + +// GetPrivateKeyIdOk returns a tuple with the PrivateKeyId field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegrationRequestParameters) GetPrivateKeyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PrivateKeyId, true +} + +// SetPrivateKeyId sets field value +func (o *CreateapigeeIntegrationRequestParameters) SetPrivateKeyId(v string) { + o.PrivateKeyId = v +} + +// GetProjectId returns the ProjectId field value +func (o *CreateapigeeIntegrationRequestParameters) GetProjectId() string { + if o == nil { + var ret string + return ret + } + + return o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegrationRequestParameters) GetProjectIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProjectId, true +} + +// SetProjectId sets field value +func (o *CreateapigeeIntegrationRequestParameters) SetProjectId(v string) { + o.ProjectId = v +} + +// GetTokenUri returns the TokenUri field value +func (o *CreateapigeeIntegrationRequestParameters) GetTokenUri() string { + if o == nil { + var ret string + return ret + } + + return o.TokenUri +} + +// GetTokenUriOk returns a tuple with the TokenUri field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegrationRequestParameters) GetTokenUriOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TokenUri, true +} + +// SetTokenUri sets field value +func (o *CreateapigeeIntegrationRequestParameters) SetTokenUri(v string) { + o.TokenUri = v +} + +// GetType returns the Type field value +func (o *CreateapigeeIntegrationRequestParameters) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegrationRequestParameters) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *CreateapigeeIntegrationRequestParameters) SetType(v string) { + o.Type = v +} + +// GetUniverseDomain returns the UniverseDomain field value +func (o *CreateapigeeIntegrationRequestParameters) GetUniverseDomain() string { + if o == nil { + var ret string + return ret + } + + return o.UniverseDomain +} + +// GetUniverseDomainOk returns a tuple with the UniverseDomain field value +// and a boolean to check if the value has been set. +func (o *CreateapigeeIntegrationRequestParameters) GetUniverseDomainOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UniverseDomain, true +} + +// SetUniverseDomain sets field value +func (o *CreateapigeeIntegrationRequestParameters) SetUniverseDomain(v string) { + o.UniverseDomain = v +} + +func (o CreateapigeeIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateapigeeIntegrationRequestParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["auth_provider_x509_cert_url"] = o.AuthProviderX509CertUrl + toSerialize["auth_uri"] = o.AuthUri + toSerialize["client_email"] = o.ClientEmail + toSerialize["client_id"] = o.ClientId + toSerialize["client_x509_cert_url"] = o.ClientX509CertUrl + toSerialize["private_key"] = o.PrivateKey + toSerialize["private_key_id"] = o.PrivateKeyId + toSerialize["project_id"] = o.ProjectId + toSerialize["token_uri"] = o.TokenUri + toSerialize["type"] = o.Type + toSerialize["universe_domain"] = o.UniverseDomain + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateapigeeIntegrationRequestParameters) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "auth_provider_x509_cert_url", + "auth_uri", + "client_email", + "client_id", + "client_x509_cert_url", + "private_key", + "private_key_id", + "project_id", + "token_uri", + "type", + "universe_domain", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateapigeeIntegrationRequestParameters := _CreateapigeeIntegrationRequestParameters{} + + err = json.Unmarshal(data, &varCreateapigeeIntegrationRequestParameters) + + if err != nil { + return err + } + + *o = CreateapigeeIntegrationRequestParameters(varCreateapigeeIntegrationRequestParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "auth_provider_x509_cert_url") + delete(additionalProperties, "auth_uri") + delete(additionalProperties, "client_email") + delete(additionalProperties, "client_id") + delete(additionalProperties, "client_x509_cert_url") + delete(additionalProperties, "private_key") + delete(additionalProperties, "private_key_id") + delete(additionalProperties, "project_id") + delete(additionalProperties, "token_uri") + delete(additionalProperties, "type") + delete(additionalProperties, "universe_domain") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateapigeeIntegrationRequestParameters struct { + value *CreateapigeeIntegrationRequestParameters + isSet bool +} + +func (v NullableCreateapigeeIntegrationRequestParameters) Get() *CreateapigeeIntegrationRequestParameters { + return v.value +} + +func (v *NullableCreateapigeeIntegrationRequestParameters) Set(val *CreateapigeeIntegrationRequestParameters) { + v.value = val + v.isSet = true +} + +func (v NullableCreateapigeeIntegrationRequestParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateapigeeIntegrationRequestParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateapigeeIntegrationRequestParameters(val *CreateapigeeIntegrationRequestParameters) *NullableCreateapigeeIntegrationRequestParameters { + return &NullableCreateapigeeIntegrationRequestParameters{value: val, isSet: true} +} + +func (v NullableCreateapigeeIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateapigeeIntegrationRequestParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createaws_integration_200_response.go b/pkg/api/v3/model_createaws_integration_200_response.go new file mode 100644 index 00000000..cb195178 --- /dev/null +++ b/pkg/api/v3/model_createaws_integration_200_response.go @@ -0,0 +1,551 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "time" + "fmt" +) + +// checks if the CreateawsIntegration200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateawsIntegration200Response{} + +// CreateawsIntegration200Response struct for CreateawsIntegration200Response +type CreateawsIntegration200Response struct { + // The id of the integration + Id string `json:"id"` + // The name of the integration + Name string `json:"name"` + // The date and time the integration was created + CreatedAt time.Time `json:"createdAt"` + // The date and time the integration was last updated + UpdatedAt time.Time `json:"updatedAt"` + // The date and time the integration is scheduled for deletion + ScheduledForDeletionAt *time.Time `json:"scheduledForDeletionAt,omitempty"` + // The date and time the last pull workflow was executed + LastPullWorkflowAt *time.Time `json:"lastPullWorkflowAt,omitempty"` + Kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND `json:"kind"` + // Whether the integration is valid + Valid bool `json:"valid"` + // The validation errors of the integration + ValidationErrors []string `json:"validationErrors"` + // The id of the organization the integration belongs to + OrganizationId string `json:"organizationId"` + // The projects of the integration + Projects []ListProjects200ResponseDataInner `json:"projects"` + Parameters CreateawsIntegrationRequestParameters `json:"parameters"` + Location *LocationDetailed1 `json:"location,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateawsIntegration200Response CreateawsIntegration200Response + +// NewCreateawsIntegration200Response instantiates a new CreateawsIntegration200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateawsIntegration200Response(id string, name string, createdAt time.Time, updatedAt time.Time, kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND, valid bool, validationErrors []string, organizationId string, projects []ListProjects200ResponseDataInner, parameters CreateawsIntegrationRequestParameters) *CreateawsIntegration200Response { + this := CreateawsIntegration200Response{} + this.Id = id + this.Name = name + this.CreatedAt = createdAt + this.UpdatedAt = updatedAt + this.Kind = kind + this.Valid = valid + this.ValidationErrors = validationErrors + this.OrganizationId = organizationId + this.Projects = projects + this.Parameters = parameters + return &this +} + +// NewCreateawsIntegration200ResponseWithDefaults instantiates a new CreateawsIntegration200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateawsIntegration200ResponseWithDefaults() *CreateawsIntegration200Response { + this := CreateawsIntegration200Response{} + return &this +} + +// GetId returns the Id field value +func (o *CreateawsIntegration200Response) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CreateawsIntegration200Response) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CreateawsIntegration200Response) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *CreateawsIntegration200Response) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateawsIntegration200Response) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateawsIntegration200Response) SetName(v string) { + o.Name = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *CreateawsIntegration200Response) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *CreateawsIntegration200Response) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *CreateawsIntegration200Response) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *CreateawsIntegration200Response) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *CreateawsIntegration200Response) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *CreateawsIntegration200Response) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +// GetScheduledForDeletionAt returns the ScheduledForDeletionAt field value if set, zero value otherwise. +func (o *CreateawsIntegration200Response) GetScheduledForDeletionAt() time.Time { + if o == nil || IsNil(o.ScheduledForDeletionAt) { + var ret time.Time + return ret + } + return *o.ScheduledForDeletionAt +} + +// GetScheduledForDeletionAtOk returns a tuple with the ScheduledForDeletionAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateawsIntegration200Response) GetScheduledForDeletionAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.ScheduledForDeletionAt) { + return nil, false + } + return o.ScheduledForDeletionAt, true +} + +// HasScheduledForDeletionAt returns a boolean if a field has been set. +func (o *CreateawsIntegration200Response) HasScheduledForDeletionAt() bool { + if o != nil && !IsNil(o.ScheduledForDeletionAt) { + return true + } + + return false +} + +// SetScheduledForDeletionAt gets a reference to the given time.Time and assigns it to the ScheduledForDeletionAt field. +func (o *CreateawsIntegration200Response) SetScheduledForDeletionAt(v time.Time) { + o.ScheduledForDeletionAt = &v +} + +// GetLastPullWorkflowAt returns the LastPullWorkflowAt field value if set, zero value otherwise. +func (o *CreateawsIntegration200Response) GetLastPullWorkflowAt() time.Time { + if o == nil || IsNil(o.LastPullWorkflowAt) { + var ret time.Time + return ret + } + return *o.LastPullWorkflowAt +} + +// GetLastPullWorkflowAtOk returns a tuple with the LastPullWorkflowAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateawsIntegration200Response) GetLastPullWorkflowAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastPullWorkflowAt) { + return nil, false + } + return o.LastPullWorkflowAt, true +} + +// HasLastPullWorkflowAt returns a boolean if a field has been set. +func (o *CreateawsIntegration200Response) HasLastPullWorkflowAt() bool { + if o != nil && !IsNil(o.LastPullWorkflowAt) { + return true + } + + return false +} + +// SetLastPullWorkflowAt gets a reference to the given time.Time and assigns it to the LastPullWorkflowAt field. +func (o *CreateawsIntegration200Response) SetLastPullWorkflowAt(v time.Time) { + o.LastPullWorkflowAt = &v +} + +// GetKind returns the Kind field value +func (o *CreateawsIntegration200Response) GetKind() ENUMPROPERTIESDATAITEMSPROPERTIESKIND { + if o == nil { + var ret ENUMPROPERTIESDATAITEMSPROPERTIESKIND + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *CreateawsIntegration200Response) GetKindOk() (*ENUMPROPERTIESDATAITEMSPROPERTIESKIND, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *CreateawsIntegration200Response) SetKind(v ENUMPROPERTIESDATAITEMSPROPERTIESKIND) { + o.Kind = v +} + +// GetValid returns the Valid field value +func (o *CreateawsIntegration200Response) GetValid() bool { + if o == nil { + var ret bool + return ret + } + + return o.Valid +} + +// GetValidOk returns a tuple with the Valid field value +// and a boolean to check if the value has been set. +func (o *CreateawsIntegration200Response) GetValidOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Valid, true +} + +// SetValid sets field value +func (o *CreateawsIntegration200Response) SetValid(v bool) { + o.Valid = v +} + +// GetValidationErrors returns the ValidationErrors field value +func (o *CreateawsIntegration200Response) GetValidationErrors() []string { + if o == nil { + var ret []string + return ret + } + + return o.ValidationErrors +} + +// GetValidationErrorsOk returns a tuple with the ValidationErrors field value +// and a boolean to check if the value has been set. +func (o *CreateawsIntegration200Response) GetValidationErrorsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ValidationErrors, true +} + +// SetValidationErrors sets field value +func (o *CreateawsIntegration200Response) SetValidationErrors(v []string) { + o.ValidationErrors = v +} + +// GetOrganizationId returns the OrganizationId field value +func (o *CreateawsIntegration200Response) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *CreateawsIntegration200Response) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *CreateawsIntegration200Response) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetProjects returns the Projects field value +func (o *CreateawsIntegration200Response) GetProjects() []ListProjects200ResponseDataInner { + if o == nil { + var ret []ListProjects200ResponseDataInner + return ret + } + + return o.Projects +} + +// GetProjectsOk returns a tuple with the Projects field value +// and a boolean to check if the value has been set. +func (o *CreateawsIntegration200Response) GetProjectsOk() ([]ListProjects200ResponseDataInner, bool) { + if o == nil { + return nil, false + } + return o.Projects, true +} + +// SetProjects sets field value +func (o *CreateawsIntegration200Response) SetProjects(v []ListProjects200ResponseDataInner) { + o.Projects = v +} + +// GetParameters returns the Parameters field value +func (o *CreateawsIntegration200Response) GetParameters() CreateawsIntegrationRequestParameters { + if o == nil { + var ret CreateawsIntegrationRequestParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreateawsIntegration200Response) GetParametersOk() (*CreateawsIntegrationRequestParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreateawsIntegration200Response) SetParameters(v CreateawsIntegrationRequestParameters) { + o.Parameters = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *CreateawsIntegration200Response) GetLocation() LocationDetailed1 { + if o == nil || IsNil(o.Location) { + var ret LocationDetailed1 + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateawsIntegration200Response) GetLocationOk() (*LocationDetailed1, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *CreateawsIntegration200Response) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given LocationDetailed1 and assigns it to the Location field. +func (o *CreateawsIntegration200Response) SetLocation(v LocationDetailed1) { + o.Location = &v +} + +func (o CreateawsIntegration200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateawsIntegration200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["createdAt"] = o.CreatedAt + toSerialize["updatedAt"] = o.UpdatedAt + if !IsNil(o.ScheduledForDeletionAt) { + toSerialize["scheduledForDeletionAt"] = o.ScheduledForDeletionAt + } + if !IsNil(o.LastPullWorkflowAt) { + toSerialize["lastPullWorkflowAt"] = o.LastPullWorkflowAt + } + toSerialize["kind"] = o.Kind + toSerialize["valid"] = o.Valid + toSerialize["validationErrors"] = o.ValidationErrors + toSerialize["organizationId"] = o.OrganizationId + toSerialize["projects"] = o.Projects + toSerialize["parameters"] = o.Parameters + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateawsIntegration200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "createdAt", + "updatedAt", + "kind", + "valid", + "validationErrors", + "organizationId", + "projects", + "parameters", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateawsIntegration200Response := _CreateawsIntegration200Response{} + + err = json.Unmarshal(data, &varCreateawsIntegration200Response) + + if err != nil { + return err + } + + *o = CreateawsIntegration200Response(varCreateawsIntegration200Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "createdAt") + delete(additionalProperties, "updatedAt") + delete(additionalProperties, "scheduledForDeletionAt") + delete(additionalProperties, "lastPullWorkflowAt") + delete(additionalProperties, "kind") + delete(additionalProperties, "valid") + delete(additionalProperties, "validationErrors") + delete(additionalProperties, "organizationId") + delete(additionalProperties, "projects") + delete(additionalProperties, "parameters") + delete(additionalProperties, "location") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateawsIntegration200Response struct { + value *CreateawsIntegration200Response + isSet bool +} + +func (v NullableCreateawsIntegration200Response) Get() *CreateawsIntegration200Response { + return v.value +} + +func (v *NullableCreateawsIntegration200Response) Set(val *CreateawsIntegration200Response) { + v.value = val + v.isSet = true +} + +func (v NullableCreateawsIntegration200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateawsIntegration200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateawsIntegration200Response(val *CreateawsIntegration200Response) *NullableCreateawsIntegration200Response { + return &NullableCreateawsIntegration200Response{value: val, isSet: true} +} + +func (v NullableCreateawsIntegration200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateawsIntegration200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createaws_integration_request.go b/pkg/api/v3/model_createaws_integration_request.go new file mode 100644 index 00000000..e16f48a4 --- /dev/null +++ b/pkg/api/v3/model_createaws_integration_request.go @@ -0,0 +1,304 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateawsIntegrationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateawsIntegrationRequest{} + +// CreateawsIntegrationRequest struct for CreateawsIntegrationRequest +type CreateawsIntegrationRequest struct { + // The organization ID to create the integration for + OrganizationId string `json:"organizationId"` + // The name of the integration + Name string `json:"name"` + Parameters CreateawsIntegrationRequestParameters `json:"parameters"` + // Optional proxy ID to create the integration for + ProxyId *string `json:"proxyId,omitempty"` + // Optional list of project IDs to create the integration for + ProjectIds []string `json:"projectIds,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateawsIntegrationRequest CreateawsIntegrationRequest + +// NewCreateawsIntegrationRequest instantiates a new CreateawsIntegrationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateawsIntegrationRequest(organizationId string, name string, parameters CreateawsIntegrationRequestParameters) *CreateawsIntegrationRequest { + this := CreateawsIntegrationRequest{} + this.OrganizationId = organizationId + this.Name = name + this.Parameters = parameters + return &this +} + +// NewCreateawsIntegrationRequestWithDefaults instantiates a new CreateawsIntegrationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateawsIntegrationRequestWithDefaults() *CreateawsIntegrationRequest { + this := CreateawsIntegrationRequest{} + return &this +} + +// GetOrganizationId returns the OrganizationId field value +func (o *CreateawsIntegrationRequest) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *CreateawsIntegrationRequest) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *CreateawsIntegrationRequest) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetName returns the Name field value +func (o *CreateawsIntegrationRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateawsIntegrationRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateawsIntegrationRequest) SetName(v string) { + o.Name = v +} + +// GetParameters returns the Parameters field value +func (o *CreateawsIntegrationRequest) GetParameters() CreateawsIntegrationRequestParameters { + if o == nil { + var ret CreateawsIntegrationRequestParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreateawsIntegrationRequest) GetParametersOk() (*CreateawsIntegrationRequestParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreateawsIntegrationRequest) SetParameters(v CreateawsIntegrationRequestParameters) { + o.Parameters = v +} + +// GetProxyId returns the ProxyId field value if set, zero value otherwise. +func (o *CreateawsIntegrationRequest) GetProxyId() string { + if o == nil || IsNil(o.ProxyId) { + var ret string + return ret + } + return *o.ProxyId +} + +// GetProxyIdOk returns a tuple with the ProxyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateawsIntegrationRequest) GetProxyIdOk() (*string, bool) { + if o == nil || IsNil(o.ProxyId) { + return nil, false + } + return o.ProxyId, true +} + +// HasProxyId returns a boolean if a field has been set. +func (o *CreateawsIntegrationRequest) HasProxyId() bool { + if o != nil && !IsNil(o.ProxyId) { + return true + } + + return false +} + +// SetProxyId gets a reference to the given string and assigns it to the ProxyId field. +func (o *CreateawsIntegrationRequest) SetProxyId(v string) { + o.ProxyId = &v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateawsIntegrationRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateawsIntegrationRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateawsIntegrationRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateawsIntegrationRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o CreateawsIntegrationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateawsIntegrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["organizationId"] = o.OrganizationId + toSerialize["name"] = o.Name + toSerialize["parameters"] = o.Parameters + if !IsNil(o.ProxyId) { + toSerialize["proxyId"] = o.ProxyId + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateawsIntegrationRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "organizationId", + "name", + "parameters", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateawsIntegrationRequest := _CreateawsIntegrationRequest{} + + err = json.Unmarshal(data, &varCreateawsIntegrationRequest) + + if err != nil { + return err + } + + *o = CreateawsIntegrationRequest(varCreateawsIntegrationRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "organizationId") + delete(additionalProperties, "name") + delete(additionalProperties, "parameters") + delete(additionalProperties, "proxyId") + delete(additionalProperties, "projectIds") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateawsIntegrationRequest struct { + value *CreateawsIntegrationRequest + isSet bool +} + +func (v NullableCreateawsIntegrationRequest) Get() *CreateawsIntegrationRequest { + return v.value +} + +func (v *NullableCreateawsIntegrationRequest) Set(val *CreateawsIntegrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateawsIntegrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateawsIntegrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateawsIntegrationRequest(val *CreateawsIntegrationRequest) *NullableCreateawsIntegrationRequest { + return &NullableCreateawsIntegrationRequest{value: val, isSet: true} +} + +func (v NullableCreateawsIntegrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateawsIntegrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createaws_integration_request_parameters.go b/pkg/api/v3/model_createaws_integration_request_parameters.go new file mode 100644 index 00000000..b0428209 --- /dev/null +++ b/pkg/api/v3/model_createaws_integration_request_parameters.go @@ -0,0 +1,234 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateawsIntegrationRequestParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateawsIntegrationRequestParameters{} + +// CreateawsIntegrationRequestParameters The parameters of the integration +type CreateawsIntegrationRequestParameters struct { + PublicKey string `json:"public_key"` + PrivateKey string `json:"private_key"` + ExternalIntegrationRoleArn *string `json:"external_integration_role_arn,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateawsIntegrationRequestParameters CreateawsIntegrationRequestParameters + +// NewCreateawsIntegrationRequestParameters instantiates a new CreateawsIntegrationRequestParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateawsIntegrationRequestParameters(publicKey string, privateKey string) *CreateawsIntegrationRequestParameters { + this := CreateawsIntegrationRequestParameters{} + this.PublicKey = publicKey + this.PrivateKey = privateKey + return &this +} + +// NewCreateawsIntegrationRequestParametersWithDefaults instantiates a new CreateawsIntegrationRequestParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateawsIntegrationRequestParametersWithDefaults() *CreateawsIntegrationRequestParameters { + this := CreateawsIntegrationRequestParameters{} + return &this +} + +// GetPublicKey returns the PublicKey field value +func (o *CreateawsIntegrationRequestParameters) GetPublicKey() string { + if o == nil { + var ret string + return ret + } + + return o.PublicKey +} + +// GetPublicKeyOk returns a tuple with the PublicKey field value +// and a boolean to check if the value has been set. +func (o *CreateawsIntegrationRequestParameters) GetPublicKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PublicKey, true +} + +// SetPublicKey sets field value +func (o *CreateawsIntegrationRequestParameters) SetPublicKey(v string) { + o.PublicKey = v +} + +// GetPrivateKey returns the PrivateKey field value +func (o *CreateawsIntegrationRequestParameters) GetPrivateKey() string { + if o == nil { + var ret string + return ret + } + + return o.PrivateKey +} + +// GetPrivateKeyOk returns a tuple with the PrivateKey field value +// and a boolean to check if the value has been set. +func (o *CreateawsIntegrationRequestParameters) GetPrivateKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PrivateKey, true +} + +// SetPrivateKey sets field value +func (o *CreateawsIntegrationRequestParameters) SetPrivateKey(v string) { + o.PrivateKey = v +} + +// GetExternalIntegrationRoleArn returns the ExternalIntegrationRoleArn field value if set, zero value otherwise. +func (o *CreateawsIntegrationRequestParameters) GetExternalIntegrationRoleArn() string { + if o == nil || IsNil(o.ExternalIntegrationRoleArn) { + var ret string + return ret + } + return *o.ExternalIntegrationRoleArn +} + +// GetExternalIntegrationRoleArnOk returns a tuple with the ExternalIntegrationRoleArn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateawsIntegrationRequestParameters) GetExternalIntegrationRoleArnOk() (*string, bool) { + if o == nil || IsNil(o.ExternalIntegrationRoleArn) { + return nil, false + } + return o.ExternalIntegrationRoleArn, true +} + +// HasExternalIntegrationRoleArn returns a boolean if a field has been set. +func (o *CreateawsIntegrationRequestParameters) HasExternalIntegrationRoleArn() bool { + if o != nil && !IsNil(o.ExternalIntegrationRoleArn) { + return true + } + + return false +} + +// SetExternalIntegrationRoleArn gets a reference to the given string and assigns it to the ExternalIntegrationRoleArn field. +func (o *CreateawsIntegrationRequestParameters) SetExternalIntegrationRoleArn(v string) { + o.ExternalIntegrationRoleArn = &v +} + +func (o CreateawsIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateawsIntegrationRequestParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["public_key"] = o.PublicKey + toSerialize["private_key"] = o.PrivateKey + if !IsNil(o.ExternalIntegrationRoleArn) { + toSerialize["external_integration_role_arn"] = o.ExternalIntegrationRoleArn + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateawsIntegrationRequestParameters) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "public_key", + "private_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateawsIntegrationRequestParameters := _CreateawsIntegrationRequestParameters{} + + err = json.Unmarshal(data, &varCreateawsIntegrationRequestParameters) + + if err != nil { + return err + } + + *o = CreateawsIntegrationRequestParameters(varCreateawsIntegrationRequestParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "public_key") + delete(additionalProperties, "private_key") + delete(additionalProperties, "external_integration_role_arn") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateawsIntegrationRequestParameters struct { + value *CreateawsIntegrationRequestParameters + isSet bool +} + +func (v NullableCreateawsIntegrationRequestParameters) Get() *CreateawsIntegrationRequestParameters { + return v.value +} + +func (v *NullableCreateawsIntegrationRequestParameters) Set(val *CreateawsIntegrationRequestParameters) { + v.value = val + v.isSet = true +} + +func (v NullableCreateawsIntegrationRequestParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateawsIntegrationRequestParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateawsIntegrationRequestParameters(val *CreateawsIntegrationRequestParameters) *NullableCreateawsIntegrationRequestParameters { + return &NullableCreateawsIntegrationRequestParameters{value: val, isSet: true} +} + +func (v NullableCreateawsIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateawsIntegrationRequestParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createazure_integration_200_response.go b/pkg/api/v3/model_createazure_integration_200_response.go new file mode 100644 index 00000000..51f558c4 --- /dev/null +++ b/pkg/api/v3/model_createazure_integration_200_response.go @@ -0,0 +1,551 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "time" + "fmt" +) + +// checks if the CreateazureIntegration200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateazureIntegration200Response{} + +// CreateazureIntegration200Response struct for CreateazureIntegration200Response +type CreateazureIntegration200Response struct { + // The id of the integration + Id string `json:"id"` + // The name of the integration + Name string `json:"name"` + // The date and time the integration was created + CreatedAt time.Time `json:"createdAt"` + // The date and time the integration was last updated + UpdatedAt time.Time `json:"updatedAt"` + // The date and time the integration is scheduled for deletion + ScheduledForDeletionAt *time.Time `json:"scheduledForDeletionAt,omitempty"` + // The date and time the last pull workflow was executed + LastPullWorkflowAt *time.Time `json:"lastPullWorkflowAt,omitempty"` + Kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND `json:"kind"` + // Whether the integration is valid + Valid bool `json:"valid"` + // The validation errors of the integration + ValidationErrors []string `json:"validationErrors"` + // The id of the organization the integration belongs to + OrganizationId string `json:"organizationId"` + // The projects of the integration + Projects []ListProjects200ResponseDataInner `json:"projects"` + Parameters CreateazureIntegrationRequestParameters `json:"parameters"` + Location *LocationDetailed1 `json:"location,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateazureIntegration200Response CreateazureIntegration200Response + +// NewCreateazureIntegration200Response instantiates a new CreateazureIntegration200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateazureIntegration200Response(id string, name string, createdAt time.Time, updatedAt time.Time, kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND, valid bool, validationErrors []string, organizationId string, projects []ListProjects200ResponseDataInner, parameters CreateazureIntegrationRequestParameters) *CreateazureIntegration200Response { + this := CreateazureIntegration200Response{} + this.Id = id + this.Name = name + this.CreatedAt = createdAt + this.UpdatedAt = updatedAt + this.Kind = kind + this.Valid = valid + this.ValidationErrors = validationErrors + this.OrganizationId = organizationId + this.Projects = projects + this.Parameters = parameters + return &this +} + +// NewCreateazureIntegration200ResponseWithDefaults instantiates a new CreateazureIntegration200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateazureIntegration200ResponseWithDefaults() *CreateazureIntegration200Response { + this := CreateazureIntegration200Response{} + return &this +} + +// GetId returns the Id field value +func (o *CreateazureIntegration200Response) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CreateazureIntegration200Response) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CreateazureIntegration200Response) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *CreateazureIntegration200Response) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateazureIntegration200Response) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateazureIntegration200Response) SetName(v string) { + o.Name = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *CreateazureIntegration200Response) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *CreateazureIntegration200Response) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *CreateazureIntegration200Response) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *CreateazureIntegration200Response) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *CreateazureIntegration200Response) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *CreateazureIntegration200Response) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +// GetScheduledForDeletionAt returns the ScheduledForDeletionAt field value if set, zero value otherwise. +func (o *CreateazureIntegration200Response) GetScheduledForDeletionAt() time.Time { + if o == nil || IsNil(o.ScheduledForDeletionAt) { + var ret time.Time + return ret + } + return *o.ScheduledForDeletionAt +} + +// GetScheduledForDeletionAtOk returns a tuple with the ScheduledForDeletionAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateazureIntegration200Response) GetScheduledForDeletionAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.ScheduledForDeletionAt) { + return nil, false + } + return o.ScheduledForDeletionAt, true +} + +// HasScheduledForDeletionAt returns a boolean if a field has been set. +func (o *CreateazureIntegration200Response) HasScheduledForDeletionAt() bool { + if o != nil && !IsNil(o.ScheduledForDeletionAt) { + return true + } + + return false +} + +// SetScheduledForDeletionAt gets a reference to the given time.Time and assigns it to the ScheduledForDeletionAt field. +func (o *CreateazureIntegration200Response) SetScheduledForDeletionAt(v time.Time) { + o.ScheduledForDeletionAt = &v +} + +// GetLastPullWorkflowAt returns the LastPullWorkflowAt field value if set, zero value otherwise. +func (o *CreateazureIntegration200Response) GetLastPullWorkflowAt() time.Time { + if o == nil || IsNil(o.LastPullWorkflowAt) { + var ret time.Time + return ret + } + return *o.LastPullWorkflowAt +} + +// GetLastPullWorkflowAtOk returns a tuple with the LastPullWorkflowAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateazureIntegration200Response) GetLastPullWorkflowAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastPullWorkflowAt) { + return nil, false + } + return o.LastPullWorkflowAt, true +} + +// HasLastPullWorkflowAt returns a boolean if a field has been set. +func (o *CreateazureIntegration200Response) HasLastPullWorkflowAt() bool { + if o != nil && !IsNil(o.LastPullWorkflowAt) { + return true + } + + return false +} + +// SetLastPullWorkflowAt gets a reference to the given time.Time and assigns it to the LastPullWorkflowAt field. +func (o *CreateazureIntegration200Response) SetLastPullWorkflowAt(v time.Time) { + o.LastPullWorkflowAt = &v +} + +// GetKind returns the Kind field value +func (o *CreateazureIntegration200Response) GetKind() ENUMPROPERTIESDATAITEMSPROPERTIESKIND { + if o == nil { + var ret ENUMPROPERTIESDATAITEMSPROPERTIESKIND + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *CreateazureIntegration200Response) GetKindOk() (*ENUMPROPERTIESDATAITEMSPROPERTIESKIND, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *CreateazureIntegration200Response) SetKind(v ENUMPROPERTIESDATAITEMSPROPERTIESKIND) { + o.Kind = v +} + +// GetValid returns the Valid field value +func (o *CreateazureIntegration200Response) GetValid() bool { + if o == nil { + var ret bool + return ret + } + + return o.Valid +} + +// GetValidOk returns a tuple with the Valid field value +// and a boolean to check if the value has been set. +func (o *CreateazureIntegration200Response) GetValidOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Valid, true +} + +// SetValid sets field value +func (o *CreateazureIntegration200Response) SetValid(v bool) { + o.Valid = v +} + +// GetValidationErrors returns the ValidationErrors field value +func (o *CreateazureIntegration200Response) GetValidationErrors() []string { + if o == nil { + var ret []string + return ret + } + + return o.ValidationErrors +} + +// GetValidationErrorsOk returns a tuple with the ValidationErrors field value +// and a boolean to check if the value has been set. +func (o *CreateazureIntegration200Response) GetValidationErrorsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ValidationErrors, true +} + +// SetValidationErrors sets field value +func (o *CreateazureIntegration200Response) SetValidationErrors(v []string) { + o.ValidationErrors = v +} + +// GetOrganizationId returns the OrganizationId field value +func (o *CreateazureIntegration200Response) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *CreateazureIntegration200Response) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *CreateazureIntegration200Response) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetProjects returns the Projects field value +func (o *CreateazureIntegration200Response) GetProjects() []ListProjects200ResponseDataInner { + if o == nil { + var ret []ListProjects200ResponseDataInner + return ret + } + + return o.Projects +} + +// GetProjectsOk returns a tuple with the Projects field value +// and a boolean to check if the value has been set. +func (o *CreateazureIntegration200Response) GetProjectsOk() ([]ListProjects200ResponseDataInner, bool) { + if o == nil { + return nil, false + } + return o.Projects, true +} + +// SetProjects sets field value +func (o *CreateazureIntegration200Response) SetProjects(v []ListProjects200ResponseDataInner) { + o.Projects = v +} + +// GetParameters returns the Parameters field value +func (o *CreateazureIntegration200Response) GetParameters() CreateazureIntegrationRequestParameters { + if o == nil { + var ret CreateazureIntegrationRequestParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreateazureIntegration200Response) GetParametersOk() (*CreateazureIntegrationRequestParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreateazureIntegration200Response) SetParameters(v CreateazureIntegrationRequestParameters) { + o.Parameters = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *CreateazureIntegration200Response) GetLocation() LocationDetailed1 { + if o == nil || IsNil(o.Location) { + var ret LocationDetailed1 + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateazureIntegration200Response) GetLocationOk() (*LocationDetailed1, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *CreateazureIntegration200Response) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given LocationDetailed1 and assigns it to the Location field. +func (o *CreateazureIntegration200Response) SetLocation(v LocationDetailed1) { + o.Location = &v +} + +func (o CreateazureIntegration200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateazureIntegration200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["createdAt"] = o.CreatedAt + toSerialize["updatedAt"] = o.UpdatedAt + if !IsNil(o.ScheduledForDeletionAt) { + toSerialize["scheduledForDeletionAt"] = o.ScheduledForDeletionAt + } + if !IsNil(o.LastPullWorkflowAt) { + toSerialize["lastPullWorkflowAt"] = o.LastPullWorkflowAt + } + toSerialize["kind"] = o.Kind + toSerialize["valid"] = o.Valid + toSerialize["validationErrors"] = o.ValidationErrors + toSerialize["organizationId"] = o.OrganizationId + toSerialize["projects"] = o.Projects + toSerialize["parameters"] = o.Parameters + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateazureIntegration200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "createdAt", + "updatedAt", + "kind", + "valid", + "validationErrors", + "organizationId", + "projects", + "parameters", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateazureIntegration200Response := _CreateazureIntegration200Response{} + + err = json.Unmarshal(data, &varCreateazureIntegration200Response) + + if err != nil { + return err + } + + *o = CreateazureIntegration200Response(varCreateazureIntegration200Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "createdAt") + delete(additionalProperties, "updatedAt") + delete(additionalProperties, "scheduledForDeletionAt") + delete(additionalProperties, "lastPullWorkflowAt") + delete(additionalProperties, "kind") + delete(additionalProperties, "valid") + delete(additionalProperties, "validationErrors") + delete(additionalProperties, "organizationId") + delete(additionalProperties, "projects") + delete(additionalProperties, "parameters") + delete(additionalProperties, "location") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateazureIntegration200Response struct { + value *CreateazureIntegration200Response + isSet bool +} + +func (v NullableCreateazureIntegration200Response) Get() *CreateazureIntegration200Response { + return v.value +} + +func (v *NullableCreateazureIntegration200Response) Set(val *CreateazureIntegration200Response) { + v.value = val + v.isSet = true +} + +func (v NullableCreateazureIntegration200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateazureIntegration200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateazureIntegration200Response(val *CreateazureIntegration200Response) *NullableCreateazureIntegration200Response { + return &NullableCreateazureIntegration200Response{value: val, isSet: true} +} + +func (v NullableCreateazureIntegration200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateazureIntegration200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createazure_integration_request.go b/pkg/api/v3/model_createazure_integration_request.go new file mode 100644 index 00000000..e3d5158d --- /dev/null +++ b/pkg/api/v3/model_createazure_integration_request.go @@ -0,0 +1,304 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateazureIntegrationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateazureIntegrationRequest{} + +// CreateazureIntegrationRequest struct for CreateazureIntegrationRequest +type CreateazureIntegrationRequest struct { + // The organization ID to create the integration for + OrganizationId string `json:"organizationId"` + // The name of the integration + Name string `json:"name"` + Parameters CreateazureIntegrationRequestParameters `json:"parameters"` + // Optional proxy ID to create the integration for + ProxyId *string `json:"proxyId,omitempty"` + // Optional list of project IDs to create the integration for + ProjectIds []string `json:"projectIds,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateazureIntegrationRequest CreateazureIntegrationRequest + +// NewCreateazureIntegrationRequest instantiates a new CreateazureIntegrationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateazureIntegrationRequest(organizationId string, name string, parameters CreateazureIntegrationRequestParameters) *CreateazureIntegrationRequest { + this := CreateazureIntegrationRequest{} + this.OrganizationId = organizationId + this.Name = name + this.Parameters = parameters + return &this +} + +// NewCreateazureIntegrationRequestWithDefaults instantiates a new CreateazureIntegrationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateazureIntegrationRequestWithDefaults() *CreateazureIntegrationRequest { + this := CreateazureIntegrationRequest{} + return &this +} + +// GetOrganizationId returns the OrganizationId field value +func (o *CreateazureIntegrationRequest) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *CreateazureIntegrationRequest) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *CreateazureIntegrationRequest) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetName returns the Name field value +func (o *CreateazureIntegrationRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreateazureIntegrationRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreateazureIntegrationRequest) SetName(v string) { + o.Name = v +} + +// GetParameters returns the Parameters field value +func (o *CreateazureIntegrationRequest) GetParameters() CreateazureIntegrationRequestParameters { + if o == nil { + var ret CreateazureIntegrationRequestParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreateazureIntegrationRequest) GetParametersOk() (*CreateazureIntegrationRequestParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreateazureIntegrationRequest) SetParameters(v CreateazureIntegrationRequestParameters) { + o.Parameters = v +} + +// GetProxyId returns the ProxyId field value if set, zero value otherwise. +func (o *CreateazureIntegrationRequest) GetProxyId() string { + if o == nil || IsNil(o.ProxyId) { + var ret string + return ret + } + return *o.ProxyId +} + +// GetProxyIdOk returns a tuple with the ProxyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateazureIntegrationRequest) GetProxyIdOk() (*string, bool) { + if o == nil || IsNil(o.ProxyId) { + return nil, false + } + return o.ProxyId, true +} + +// HasProxyId returns a boolean if a field has been set. +func (o *CreateazureIntegrationRequest) HasProxyId() bool { + if o != nil && !IsNil(o.ProxyId) { + return true + } + + return false +} + +// SetProxyId gets a reference to the given string and assigns it to the ProxyId field. +func (o *CreateazureIntegrationRequest) SetProxyId(v string) { + o.ProxyId = &v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreateazureIntegrationRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateazureIntegrationRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreateazureIntegrationRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreateazureIntegrationRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o CreateazureIntegrationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateazureIntegrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["organizationId"] = o.OrganizationId + toSerialize["name"] = o.Name + toSerialize["parameters"] = o.Parameters + if !IsNil(o.ProxyId) { + toSerialize["proxyId"] = o.ProxyId + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateazureIntegrationRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "organizationId", + "name", + "parameters", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateazureIntegrationRequest := _CreateazureIntegrationRequest{} + + err = json.Unmarshal(data, &varCreateazureIntegrationRequest) + + if err != nil { + return err + } + + *o = CreateazureIntegrationRequest(varCreateazureIntegrationRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "organizationId") + delete(additionalProperties, "name") + delete(additionalProperties, "parameters") + delete(additionalProperties, "proxyId") + delete(additionalProperties, "projectIds") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateazureIntegrationRequest struct { + value *CreateazureIntegrationRequest + isSet bool +} + +func (v NullableCreateazureIntegrationRequest) Get() *CreateazureIntegrationRequest { + return v.value +} + +func (v *NullableCreateazureIntegrationRequest) Set(val *CreateazureIntegrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreateazureIntegrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateazureIntegrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateazureIntegrationRequest(val *CreateazureIntegrationRequest) *NullableCreateazureIntegrationRequest { + return &NullableCreateazureIntegrationRequest{value: val, isSet: true} +} + +func (v NullableCreateazureIntegrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateazureIntegrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createazure_integration_request_parameters.go b/pkg/api/v3/model_createazure_integration_request_parameters.go new file mode 100644 index 00000000..a55985ae --- /dev/null +++ b/pkg/api/v3/model_createazure_integration_request_parameters.go @@ -0,0 +1,263 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreateazureIntegrationRequestParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreateazureIntegrationRequestParameters{} + +// CreateazureIntegrationRequestParameters The parameters of the integration +type CreateazureIntegrationRequestParameters struct { + ClientId string `json:"client_id"` + ClientSecret string `json:"client_secret"` + TenantId string `json:"tenant_id"` + SubscriptionId *string `json:"subscription_id,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreateazureIntegrationRequestParameters CreateazureIntegrationRequestParameters + +// NewCreateazureIntegrationRequestParameters instantiates a new CreateazureIntegrationRequestParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreateazureIntegrationRequestParameters(clientId string, clientSecret string, tenantId string) *CreateazureIntegrationRequestParameters { + this := CreateazureIntegrationRequestParameters{} + this.ClientId = clientId + this.ClientSecret = clientSecret + this.TenantId = tenantId + return &this +} + +// NewCreateazureIntegrationRequestParametersWithDefaults instantiates a new CreateazureIntegrationRequestParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreateazureIntegrationRequestParametersWithDefaults() *CreateazureIntegrationRequestParameters { + this := CreateazureIntegrationRequestParameters{} + return &this +} + +// GetClientId returns the ClientId field value +func (o *CreateazureIntegrationRequestParameters) GetClientId() string { + if o == nil { + var ret string + return ret + } + + return o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value +// and a boolean to check if the value has been set. +func (o *CreateazureIntegrationRequestParameters) GetClientIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientId, true +} + +// SetClientId sets field value +func (o *CreateazureIntegrationRequestParameters) SetClientId(v string) { + o.ClientId = v +} + +// GetClientSecret returns the ClientSecret field value +func (o *CreateazureIntegrationRequestParameters) GetClientSecret() string { + if o == nil { + var ret string + return ret + } + + return o.ClientSecret +} + +// GetClientSecretOk returns a tuple with the ClientSecret field value +// and a boolean to check if the value has been set. +func (o *CreateazureIntegrationRequestParameters) GetClientSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientSecret, true +} + +// SetClientSecret sets field value +func (o *CreateazureIntegrationRequestParameters) SetClientSecret(v string) { + o.ClientSecret = v +} + +// GetTenantId returns the TenantId field value +func (o *CreateazureIntegrationRequestParameters) GetTenantId() string { + if o == nil { + var ret string + return ret + } + + return o.TenantId +} + +// GetTenantIdOk returns a tuple with the TenantId field value +// and a boolean to check if the value has been set. +func (o *CreateazureIntegrationRequestParameters) GetTenantIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TenantId, true +} + +// SetTenantId sets field value +func (o *CreateazureIntegrationRequestParameters) SetTenantId(v string) { + o.TenantId = v +} + +// GetSubscriptionId returns the SubscriptionId field value if set, zero value otherwise. +func (o *CreateazureIntegrationRequestParameters) GetSubscriptionId() string { + if o == nil || IsNil(o.SubscriptionId) { + var ret string + return ret + } + return *o.SubscriptionId +} + +// GetSubscriptionIdOk returns a tuple with the SubscriptionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreateazureIntegrationRequestParameters) GetSubscriptionIdOk() (*string, bool) { + if o == nil || IsNil(o.SubscriptionId) { + return nil, false + } + return o.SubscriptionId, true +} + +// HasSubscriptionId returns a boolean if a field has been set. +func (o *CreateazureIntegrationRequestParameters) HasSubscriptionId() bool { + if o != nil && !IsNil(o.SubscriptionId) { + return true + } + + return false +} + +// SetSubscriptionId gets a reference to the given string and assigns it to the SubscriptionId field. +func (o *CreateazureIntegrationRequestParameters) SetSubscriptionId(v string) { + o.SubscriptionId = &v +} + +func (o CreateazureIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreateazureIntegrationRequestParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["client_id"] = o.ClientId + toSerialize["client_secret"] = o.ClientSecret + toSerialize["tenant_id"] = o.TenantId + if !IsNil(o.SubscriptionId) { + toSerialize["subscription_id"] = o.SubscriptionId + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreateazureIntegrationRequestParameters) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "client_id", + "client_secret", + "tenant_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreateazureIntegrationRequestParameters := _CreateazureIntegrationRequestParameters{} + + err = json.Unmarshal(data, &varCreateazureIntegrationRequestParameters) + + if err != nil { + return err + } + + *o = CreateazureIntegrationRequestParameters(varCreateazureIntegrationRequestParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "client_id") + delete(additionalProperties, "client_secret") + delete(additionalProperties, "tenant_id") + delete(additionalProperties, "subscription_id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreateazureIntegrationRequestParameters struct { + value *CreateazureIntegrationRequestParameters + isSet bool +} + +func (v NullableCreateazureIntegrationRequestParameters) Get() *CreateazureIntegrationRequestParameters { + return v.value +} + +func (v *NullableCreateazureIntegrationRequestParameters) Set(val *CreateazureIntegrationRequestParameters) { + v.value = val + v.isSet = true +} + +func (v NullableCreateazureIntegrationRequestParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableCreateazureIntegrationRequestParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreateazureIntegrationRequestParameters(val *CreateazureIntegrationRequestParameters) *NullableCreateazureIntegrationRequestParameters { + return &NullableCreateazureIntegrationRequestParameters{value: val, isSet: true} +} + +func (v NullableCreateazureIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreateazureIntegrationRequestParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createbitbucket_repo_integration_200_response.go b/pkg/api/v3/model_createbitbucket_repo_integration_200_response.go new file mode 100644 index 00000000..3792fc57 --- /dev/null +++ b/pkg/api/v3/model_createbitbucket_repo_integration_200_response.go @@ -0,0 +1,551 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "time" + "fmt" +) + +// checks if the CreatebitbucketRepoIntegration200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatebitbucketRepoIntegration200Response{} + +// CreatebitbucketRepoIntegration200Response struct for CreatebitbucketRepoIntegration200Response +type CreatebitbucketRepoIntegration200Response struct { + // The id of the integration + Id string `json:"id"` + // The name of the integration + Name string `json:"name"` + // The date and time the integration was created + CreatedAt time.Time `json:"createdAt"` + // The date and time the integration was last updated + UpdatedAt time.Time `json:"updatedAt"` + // The date and time the integration is scheduled for deletion + ScheduledForDeletionAt *time.Time `json:"scheduledForDeletionAt,omitempty"` + // The date and time the last pull workflow was executed + LastPullWorkflowAt *time.Time `json:"lastPullWorkflowAt,omitempty"` + Kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND `json:"kind"` + // Whether the integration is valid + Valid bool `json:"valid"` + // The validation errors of the integration + ValidationErrors []string `json:"validationErrors"` + // The id of the organization the integration belongs to + OrganizationId string `json:"organizationId"` + // The projects of the integration + Projects []ListProjects200ResponseDataInner `json:"projects"` + Parameters CreatebitbucketRepoIntegrationRequestParameters `json:"parameters"` + Location *LocationDetailed1 `json:"location,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreatebitbucketRepoIntegration200Response CreatebitbucketRepoIntegration200Response + +// NewCreatebitbucketRepoIntegration200Response instantiates a new CreatebitbucketRepoIntegration200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreatebitbucketRepoIntegration200Response(id string, name string, createdAt time.Time, updatedAt time.Time, kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND, valid bool, validationErrors []string, organizationId string, projects []ListProjects200ResponseDataInner, parameters CreatebitbucketRepoIntegrationRequestParameters) *CreatebitbucketRepoIntegration200Response { + this := CreatebitbucketRepoIntegration200Response{} + this.Id = id + this.Name = name + this.CreatedAt = createdAt + this.UpdatedAt = updatedAt + this.Kind = kind + this.Valid = valid + this.ValidationErrors = validationErrors + this.OrganizationId = organizationId + this.Projects = projects + this.Parameters = parameters + return &this +} + +// NewCreatebitbucketRepoIntegration200ResponseWithDefaults instantiates a new CreatebitbucketRepoIntegration200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreatebitbucketRepoIntegration200ResponseWithDefaults() *CreatebitbucketRepoIntegration200Response { + this := CreatebitbucketRepoIntegration200Response{} + return &this +} + +// GetId returns the Id field value +func (o *CreatebitbucketRepoIntegration200Response) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegration200Response) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CreatebitbucketRepoIntegration200Response) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *CreatebitbucketRepoIntegration200Response) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegration200Response) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreatebitbucketRepoIntegration200Response) SetName(v string) { + o.Name = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *CreatebitbucketRepoIntegration200Response) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegration200Response) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *CreatebitbucketRepoIntegration200Response) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *CreatebitbucketRepoIntegration200Response) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegration200Response) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *CreatebitbucketRepoIntegration200Response) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +// GetScheduledForDeletionAt returns the ScheduledForDeletionAt field value if set, zero value otherwise. +func (o *CreatebitbucketRepoIntegration200Response) GetScheduledForDeletionAt() time.Time { + if o == nil || IsNil(o.ScheduledForDeletionAt) { + var ret time.Time + return ret + } + return *o.ScheduledForDeletionAt +} + +// GetScheduledForDeletionAtOk returns a tuple with the ScheduledForDeletionAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegration200Response) GetScheduledForDeletionAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.ScheduledForDeletionAt) { + return nil, false + } + return o.ScheduledForDeletionAt, true +} + +// HasScheduledForDeletionAt returns a boolean if a field has been set. +func (o *CreatebitbucketRepoIntegration200Response) HasScheduledForDeletionAt() bool { + if o != nil && !IsNil(o.ScheduledForDeletionAt) { + return true + } + + return false +} + +// SetScheduledForDeletionAt gets a reference to the given time.Time and assigns it to the ScheduledForDeletionAt field. +func (o *CreatebitbucketRepoIntegration200Response) SetScheduledForDeletionAt(v time.Time) { + o.ScheduledForDeletionAt = &v +} + +// GetLastPullWorkflowAt returns the LastPullWorkflowAt field value if set, zero value otherwise. +func (o *CreatebitbucketRepoIntegration200Response) GetLastPullWorkflowAt() time.Time { + if o == nil || IsNil(o.LastPullWorkflowAt) { + var ret time.Time + return ret + } + return *o.LastPullWorkflowAt +} + +// GetLastPullWorkflowAtOk returns a tuple with the LastPullWorkflowAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegration200Response) GetLastPullWorkflowAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastPullWorkflowAt) { + return nil, false + } + return o.LastPullWorkflowAt, true +} + +// HasLastPullWorkflowAt returns a boolean if a field has been set. +func (o *CreatebitbucketRepoIntegration200Response) HasLastPullWorkflowAt() bool { + if o != nil && !IsNil(o.LastPullWorkflowAt) { + return true + } + + return false +} + +// SetLastPullWorkflowAt gets a reference to the given time.Time and assigns it to the LastPullWorkflowAt field. +func (o *CreatebitbucketRepoIntegration200Response) SetLastPullWorkflowAt(v time.Time) { + o.LastPullWorkflowAt = &v +} + +// GetKind returns the Kind field value +func (o *CreatebitbucketRepoIntegration200Response) GetKind() ENUMPROPERTIESDATAITEMSPROPERTIESKIND { + if o == nil { + var ret ENUMPROPERTIESDATAITEMSPROPERTIESKIND + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegration200Response) GetKindOk() (*ENUMPROPERTIESDATAITEMSPROPERTIESKIND, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *CreatebitbucketRepoIntegration200Response) SetKind(v ENUMPROPERTIESDATAITEMSPROPERTIESKIND) { + o.Kind = v +} + +// GetValid returns the Valid field value +func (o *CreatebitbucketRepoIntegration200Response) GetValid() bool { + if o == nil { + var ret bool + return ret + } + + return o.Valid +} + +// GetValidOk returns a tuple with the Valid field value +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegration200Response) GetValidOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Valid, true +} + +// SetValid sets field value +func (o *CreatebitbucketRepoIntegration200Response) SetValid(v bool) { + o.Valid = v +} + +// GetValidationErrors returns the ValidationErrors field value +func (o *CreatebitbucketRepoIntegration200Response) GetValidationErrors() []string { + if o == nil { + var ret []string + return ret + } + + return o.ValidationErrors +} + +// GetValidationErrorsOk returns a tuple with the ValidationErrors field value +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegration200Response) GetValidationErrorsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ValidationErrors, true +} + +// SetValidationErrors sets field value +func (o *CreatebitbucketRepoIntegration200Response) SetValidationErrors(v []string) { + o.ValidationErrors = v +} + +// GetOrganizationId returns the OrganizationId field value +func (o *CreatebitbucketRepoIntegration200Response) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegration200Response) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *CreatebitbucketRepoIntegration200Response) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetProjects returns the Projects field value +func (o *CreatebitbucketRepoIntegration200Response) GetProjects() []ListProjects200ResponseDataInner { + if o == nil { + var ret []ListProjects200ResponseDataInner + return ret + } + + return o.Projects +} + +// GetProjectsOk returns a tuple with the Projects field value +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegration200Response) GetProjectsOk() ([]ListProjects200ResponseDataInner, bool) { + if o == nil { + return nil, false + } + return o.Projects, true +} + +// SetProjects sets field value +func (o *CreatebitbucketRepoIntegration200Response) SetProjects(v []ListProjects200ResponseDataInner) { + o.Projects = v +} + +// GetParameters returns the Parameters field value +func (o *CreatebitbucketRepoIntegration200Response) GetParameters() CreatebitbucketRepoIntegrationRequestParameters { + if o == nil { + var ret CreatebitbucketRepoIntegrationRequestParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegration200Response) GetParametersOk() (*CreatebitbucketRepoIntegrationRequestParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreatebitbucketRepoIntegration200Response) SetParameters(v CreatebitbucketRepoIntegrationRequestParameters) { + o.Parameters = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *CreatebitbucketRepoIntegration200Response) GetLocation() LocationDetailed1 { + if o == nil || IsNil(o.Location) { + var ret LocationDetailed1 + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegration200Response) GetLocationOk() (*LocationDetailed1, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *CreatebitbucketRepoIntegration200Response) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given LocationDetailed1 and assigns it to the Location field. +func (o *CreatebitbucketRepoIntegration200Response) SetLocation(v LocationDetailed1) { + o.Location = &v +} + +func (o CreatebitbucketRepoIntegration200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatebitbucketRepoIntegration200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["createdAt"] = o.CreatedAt + toSerialize["updatedAt"] = o.UpdatedAt + if !IsNil(o.ScheduledForDeletionAt) { + toSerialize["scheduledForDeletionAt"] = o.ScheduledForDeletionAt + } + if !IsNil(o.LastPullWorkflowAt) { + toSerialize["lastPullWorkflowAt"] = o.LastPullWorkflowAt + } + toSerialize["kind"] = o.Kind + toSerialize["valid"] = o.Valid + toSerialize["validationErrors"] = o.ValidationErrors + toSerialize["organizationId"] = o.OrganizationId + toSerialize["projects"] = o.Projects + toSerialize["parameters"] = o.Parameters + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreatebitbucketRepoIntegration200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "createdAt", + "updatedAt", + "kind", + "valid", + "validationErrors", + "organizationId", + "projects", + "parameters", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreatebitbucketRepoIntegration200Response := _CreatebitbucketRepoIntegration200Response{} + + err = json.Unmarshal(data, &varCreatebitbucketRepoIntegration200Response) + + if err != nil { + return err + } + + *o = CreatebitbucketRepoIntegration200Response(varCreatebitbucketRepoIntegration200Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "createdAt") + delete(additionalProperties, "updatedAt") + delete(additionalProperties, "scheduledForDeletionAt") + delete(additionalProperties, "lastPullWorkflowAt") + delete(additionalProperties, "kind") + delete(additionalProperties, "valid") + delete(additionalProperties, "validationErrors") + delete(additionalProperties, "organizationId") + delete(additionalProperties, "projects") + delete(additionalProperties, "parameters") + delete(additionalProperties, "location") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreatebitbucketRepoIntegration200Response struct { + value *CreatebitbucketRepoIntegration200Response + isSet bool +} + +func (v NullableCreatebitbucketRepoIntegration200Response) Get() *CreatebitbucketRepoIntegration200Response { + return v.value +} + +func (v *NullableCreatebitbucketRepoIntegration200Response) Set(val *CreatebitbucketRepoIntegration200Response) { + v.value = val + v.isSet = true +} + +func (v NullableCreatebitbucketRepoIntegration200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatebitbucketRepoIntegration200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatebitbucketRepoIntegration200Response(val *CreatebitbucketRepoIntegration200Response) *NullableCreatebitbucketRepoIntegration200Response { + return &NullableCreatebitbucketRepoIntegration200Response{value: val, isSet: true} +} + +func (v NullableCreatebitbucketRepoIntegration200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatebitbucketRepoIntegration200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createbitbucket_repo_integration_request.go b/pkg/api/v3/model_createbitbucket_repo_integration_request.go new file mode 100644 index 00000000..42240a14 --- /dev/null +++ b/pkg/api/v3/model_createbitbucket_repo_integration_request.go @@ -0,0 +1,304 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreatebitbucketRepoIntegrationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatebitbucketRepoIntegrationRequest{} + +// CreatebitbucketRepoIntegrationRequest struct for CreatebitbucketRepoIntegrationRequest +type CreatebitbucketRepoIntegrationRequest struct { + // The organization ID to create the integration for + OrganizationId string `json:"organizationId"` + // The name of the integration + Name string `json:"name"` + Parameters CreatebitbucketRepoIntegrationRequestParameters `json:"parameters"` + // Optional proxy ID to create the integration for + ProxyId *string `json:"proxyId,omitempty"` + // Optional list of project IDs to create the integration for + ProjectIds []string `json:"projectIds,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreatebitbucketRepoIntegrationRequest CreatebitbucketRepoIntegrationRequest + +// NewCreatebitbucketRepoIntegrationRequest instantiates a new CreatebitbucketRepoIntegrationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreatebitbucketRepoIntegrationRequest(organizationId string, name string, parameters CreatebitbucketRepoIntegrationRequestParameters) *CreatebitbucketRepoIntegrationRequest { + this := CreatebitbucketRepoIntegrationRequest{} + this.OrganizationId = organizationId + this.Name = name + this.Parameters = parameters + return &this +} + +// NewCreatebitbucketRepoIntegrationRequestWithDefaults instantiates a new CreatebitbucketRepoIntegrationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreatebitbucketRepoIntegrationRequestWithDefaults() *CreatebitbucketRepoIntegrationRequest { + this := CreatebitbucketRepoIntegrationRequest{} + return &this +} + +// GetOrganizationId returns the OrganizationId field value +func (o *CreatebitbucketRepoIntegrationRequest) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegrationRequest) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *CreatebitbucketRepoIntegrationRequest) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetName returns the Name field value +func (o *CreatebitbucketRepoIntegrationRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegrationRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreatebitbucketRepoIntegrationRequest) SetName(v string) { + o.Name = v +} + +// GetParameters returns the Parameters field value +func (o *CreatebitbucketRepoIntegrationRequest) GetParameters() CreatebitbucketRepoIntegrationRequestParameters { + if o == nil { + var ret CreatebitbucketRepoIntegrationRequestParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegrationRequest) GetParametersOk() (*CreatebitbucketRepoIntegrationRequestParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreatebitbucketRepoIntegrationRequest) SetParameters(v CreatebitbucketRepoIntegrationRequestParameters) { + o.Parameters = v +} + +// GetProxyId returns the ProxyId field value if set, zero value otherwise. +func (o *CreatebitbucketRepoIntegrationRequest) GetProxyId() string { + if o == nil || IsNil(o.ProxyId) { + var ret string + return ret + } + return *o.ProxyId +} + +// GetProxyIdOk returns a tuple with the ProxyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegrationRequest) GetProxyIdOk() (*string, bool) { + if o == nil || IsNil(o.ProxyId) { + return nil, false + } + return o.ProxyId, true +} + +// HasProxyId returns a boolean if a field has been set. +func (o *CreatebitbucketRepoIntegrationRequest) HasProxyId() bool { + if o != nil && !IsNil(o.ProxyId) { + return true + } + + return false +} + +// SetProxyId gets a reference to the given string and assigns it to the ProxyId field. +func (o *CreatebitbucketRepoIntegrationRequest) SetProxyId(v string) { + o.ProxyId = &v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreatebitbucketRepoIntegrationRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegrationRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreatebitbucketRepoIntegrationRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreatebitbucketRepoIntegrationRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o CreatebitbucketRepoIntegrationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatebitbucketRepoIntegrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["organizationId"] = o.OrganizationId + toSerialize["name"] = o.Name + toSerialize["parameters"] = o.Parameters + if !IsNil(o.ProxyId) { + toSerialize["proxyId"] = o.ProxyId + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreatebitbucketRepoIntegrationRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "organizationId", + "name", + "parameters", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreatebitbucketRepoIntegrationRequest := _CreatebitbucketRepoIntegrationRequest{} + + err = json.Unmarshal(data, &varCreatebitbucketRepoIntegrationRequest) + + if err != nil { + return err + } + + *o = CreatebitbucketRepoIntegrationRequest(varCreatebitbucketRepoIntegrationRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "organizationId") + delete(additionalProperties, "name") + delete(additionalProperties, "parameters") + delete(additionalProperties, "proxyId") + delete(additionalProperties, "projectIds") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreatebitbucketRepoIntegrationRequest struct { + value *CreatebitbucketRepoIntegrationRequest + isSet bool +} + +func (v NullableCreatebitbucketRepoIntegrationRequest) Get() *CreatebitbucketRepoIntegrationRequest { + return v.value +} + +func (v *NullableCreatebitbucketRepoIntegrationRequest) Set(val *CreatebitbucketRepoIntegrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreatebitbucketRepoIntegrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatebitbucketRepoIntegrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatebitbucketRepoIntegrationRequest(val *CreatebitbucketRepoIntegrationRequest) *NullableCreatebitbucketRepoIntegrationRequest { + return &NullableCreatebitbucketRepoIntegrationRequest{value: val, isSet: true} +} + +func (v NullableCreatebitbucketRepoIntegrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatebitbucketRepoIntegrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createbitbucket_repo_integration_request_parameters.go b/pkg/api/v3/model_createbitbucket_repo_integration_request_parameters.go new file mode 100644 index 00000000..9483f0bb --- /dev/null +++ b/pkg/api/v3/model_createbitbucket_repo_integration_request_parameters.go @@ -0,0 +1,300 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreatebitbucketRepoIntegrationRequestParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatebitbucketRepoIntegrationRequestParameters{} + +// CreatebitbucketRepoIntegrationRequestParameters The parameters of the integration +type CreatebitbucketRepoIntegrationRequestParameters struct { + ApiKey string `json:"api_key"` + WorkspaceName string `json:"workspace_name"` + RepositoryName string `json:"repository_name"` + Username *string `json:"username,omitempty"` + InstanceUrl *string `json:"instance_url,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreatebitbucketRepoIntegrationRequestParameters CreatebitbucketRepoIntegrationRequestParameters + +// NewCreatebitbucketRepoIntegrationRequestParameters instantiates a new CreatebitbucketRepoIntegrationRequestParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreatebitbucketRepoIntegrationRequestParameters(apiKey string, workspaceName string, repositoryName string) *CreatebitbucketRepoIntegrationRequestParameters { + this := CreatebitbucketRepoIntegrationRequestParameters{} + this.ApiKey = apiKey + this.WorkspaceName = workspaceName + this.RepositoryName = repositoryName + return &this +} + +// NewCreatebitbucketRepoIntegrationRequestParametersWithDefaults instantiates a new CreatebitbucketRepoIntegrationRequestParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreatebitbucketRepoIntegrationRequestParametersWithDefaults() *CreatebitbucketRepoIntegrationRequestParameters { + this := CreatebitbucketRepoIntegrationRequestParameters{} + return &this +} + +// GetApiKey returns the ApiKey field value +func (o *CreatebitbucketRepoIntegrationRequestParameters) GetApiKey() string { + if o == nil { + var ret string + return ret + } + + return o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegrationRequestParameters) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiKey, true +} + +// SetApiKey sets field value +func (o *CreatebitbucketRepoIntegrationRequestParameters) SetApiKey(v string) { + o.ApiKey = v +} + +// GetWorkspaceName returns the WorkspaceName field value +func (o *CreatebitbucketRepoIntegrationRequestParameters) GetWorkspaceName() string { + if o == nil { + var ret string + return ret + } + + return o.WorkspaceName +} + +// GetWorkspaceNameOk returns a tuple with the WorkspaceName field value +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegrationRequestParameters) GetWorkspaceNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.WorkspaceName, true +} + +// SetWorkspaceName sets field value +func (o *CreatebitbucketRepoIntegrationRequestParameters) SetWorkspaceName(v string) { + o.WorkspaceName = v +} + +// GetRepositoryName returns the RepositoryName field value +func (o *CreatebitbucketRepoIntegrationRequestParameters) GetRepositoryName() string { + if o == nil { + var ret string + return ret + } + + return o.RepositoryName +} + +// GetRepositoryNameOk returns a tuple with the RepositoryName field value +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegrationRequestParameters) GetRepositoryNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RepositoryName, true +} + +// SetRepositoryName sets field value +func (o *CreatebitbucketRepoIntegrationRequestParameters) SetRepositoryName(v string) { + o.RepositoryName = v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *CreatebitbucketRepoIntegrationRequestParameters) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegrationRequestParameters) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *CreatebitbucketRepoIntegrationRequestParameters) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *CreatebitbucketRepoIntegrationRequestParameters) SetUsername(v string) { + o.Username = &v +} + +// GetInstanceUrl returns the InstanceUrl field value if set, zero value otherwise. +func (o *CreatebitbucketRepoIntegrationRequestParameters) GetInstanceUrl() string { + if o == nil || IsNil(o.InstanceUrl) { + var ret string + return ret + } + return *o.InstanceUrl +} + +// GetInstanceUrlOk returns a tuple with the InstanceUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatebitbucketRepoIntegrationRequestParameters) GetInstanceUrlOk() (*string, bool) { + if o == nil || IsNil(o.InstanceUrl) { + return nil, false + } + return o.InstanceUrl, true +} + +// HasInstanceUrl returns a boolean if a field has been set. +func (o *CreatebitbucketRepoIntegrationRequestParameters) HasInstanceUrl() bool { + if o != nil && !IsNil(o.InstanceUrl) { + return true + } + + return false +} + +// SetInstanceUrl gets a reference to the given string and assigns it to the InstanceUrl field. +func (o *CreatebitbucketRepoIntegrationRequestParameters) SetInstanceUrl(v string) { + o.InstanceUrl = &v +} + +func (o CreatebitbucketRepoIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatebitbucketRepoIntegrationRequestParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["api_key"] = o.ApiKey + toSerialize["workspace_name"] = o.WorkspaceName + toSerialize["repository_name"] = o.RepositoryName + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + if !IsNil(o.InstanceUrl) { + toSerialize["instance_url"] = o.InstanceUrl + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreatebitbucketRepoIntegrationRequestParameters) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "api_key", + "workspace_name", + "repository_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreatebitbucketRepoIntegrationRequestParameters := _CreatebitbucketRepoIntegrationRequestParameters{} + + err = json.Unmarshal(data, &varCreatebitbucketRepoIntegrationRequestParameters) + + if err != nil { + return err + } + + *o = CreatebitbucketRepoIntegrationRequestParameters(varCreatebitbucketRepoIntegrationRequestParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "api_key") + delete(additionalProperties, "workspace_name") + delete(additionalProperties, "repository_name") + delete(additionalProperties, "username") + delete(additionalProperties, "instance_url") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreatebitbucketRepoIntegrationRequestParameters struct { + value *CreatebitbucketRepoIntegrationRequestParameters + isSet bool +} + +func (v NullableCreatebitbucketRepoIntegrationRequestParameters) Get() *CreatebitbucketRepoIntegrationRequestParameters { + return v.value +} + +func (v *NullableCreatebitbucketRepoIntegrationRequestParameters) Set(val *CreatebitbucketRepoIntegrationRequestParameters) { + v.value = val + v.isSet = true +} + +func (v NullableCreatebitbucketRepoIntegrationRequestParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatebitbucketRepoIntegrationRequestParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatebitbucketRepoIntegrationRequestParameters(val *CreatebitbucketRepoIntegrationRequestParameters) *NullableCreatebitbucketRepoIntegrationRequestParameters { + return &NullableCreatebitbucketRepoIntegrationRequestParameters{value: val, isSet: true} +} + +func (v NullableCreatebitbucketRepoIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatebitbucketRepoIntegrationRequestParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createcloudflare_integration_200_response.go b/pkg/api/v3/model_createcloudflare_integration_200_response.go new file mode 100644 index 00000000..296f67ac --- /dev/null +++ b/pkg/api/v3/model_createcloudflare_integration_200_response.go @@ -0,0 +1,551 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "time" + "fmt" +) + +// checks if the CreatecloudflareIntegration200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatecloudflareIntegration200Response{} + +// CreatecloudflareIntegration200Response struct for CreatecloudflareIntegration200Response +type CreatecloudflareIntegration200Response struct { + // The id of the integration + Id string `json:"id"` + // The name of the integration + Name string `json:"name"` + // The date and time the integration was created + CreatedAt time.Time `json:"createdAt"` + // The date and time the integration was last updated + UpdatedAt time.Time `json:"updatedAt"` + // The date and time the integration is scheduled for deletion + ScheduledForDeletionAt *time.Time `json:"scheduledForDeletionAt,omitempty"` + // The date and time the last pull workflow was executed + LastPullWorkflowAt *time.Time `json:"lastPullWorkflowAt,omitempty"` + Kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND `json:"kind"` + // Whether the integration is valid + Valid bool `json:"valid"` + // The validation errors of the integration + ValidationErrors []string `json:"validationErrors"` + // The id of the organization the integration belongs to + OrganizationId string `json:"organizationId"` + // The projects of the integration + Projects []ListProjects200ResponseDataInner `json:"projects"` + Parameters CreatecloudflareIntegrationRequestParameters `json:"parameters"` + Location *LocationDetailed1 `json:"location,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreatecloudflareIntegration200Response CreatecloudflareIntegration200Response + +// NewCreatecloudflareIntegration200Response instantiates a new CreatecloudflareIntegration200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreatecloudflareIntegration200Response(id string, name string, createdAt time.Time, updatedAt time.Time, kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND, valid bool, validationErrors []string, organizationId string, projects []ListProjects200ResponseDataInner, parameters CreatecloudflareIntegrationRequestParameters) *CreatecloudflareIntegration200Response { + this := CreatecloudflareIntegration200Response{} + this.Id = id + this.Name = name + this.CreatedAt = createdAt + this.UpdatedAt = updatedAt + this.Kind = kind + this.Valid = valid + this.ValidationErrors = validationErrors + this.OrganizationId = organizationId + this.Projects = projects + this.Parameters = parameters + return &this +} + +// NewCreatecloudflareIntegration200ResponseWithDefaults instantiates a new CreatecloudflareIntegration200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreatecloudflareIntegration200ResponseWithDefaults() *CreatecloudflareIntegration200Response { + this := CreatecloudflareIntegration200Response{} + return &this +} + +// GetId returns the Id field value +func (o *CreatecloudflareIntegration200Response) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CreatecloudflareIntegration200Response) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CreatecloudflareIntegration200Response) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *CreatecloudflareIntegration200Response) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreatecloudflareIntegration200Response) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreatecloudflareIntegration200Response) SetName(v string) { + o.Name = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *CreatecloudflareIntegration200Response) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *CreatecloudflareIntegration200Response) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *CreatecloudflareIntegration200Response) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *CreatecloudflareIntegration200Response) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *CreatecloudflareIntegration200Response) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *CreatecloudflareIntegration200Response) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +// GetScheduledForDeletionAt returns the ScheduledForDeletionAt field value if set, zero value otherwise. +func (o *CreatecloudflareIntegration200Response) GetScheduledForDeletionAt() time.Time { + if o == nil || IsNil(o.ScheduledForDeletionAt) { + var ret time.Time + return ret + } + return *o.ScheduledForDeletionAt +} + +// GetScheduledForDeletionAtOk returns a tuple with the ScheduledForDeletionAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatecloudflareIntegration200Response) GetScheduledForDeletionAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.ScheduledForDeletionAt) { + return nil, false + } + return o.ScheduledForDeletionAt, true +} + +// HasScheduledForDeletionAt returns a boolean if a field has been set. +func (o *CreatecloudflareIntegration200Response) HasScheduledForDeletionAt() bool { + if o != nil && !IsNil(o.ScheduledForDeletionAt) { + return true + } + + return false +} + +// SetScheduledForDeletionAt gets a reference to the given time.Time and assigns it to the ScheduledForDeletionAt field. +func (o *CreatecloudflareIntegration200Response) SetScheduledForDeletionAt(v time.Time) { + o.ScheduledForDeletionAt = &v +} + +// GetLastPullWorkflowAt returns the LastPullWorkflowAt field value if set, zero value otherwise. +func (o *CreatecloudflareIntegration200Response) GetLastPullWorkflowAt() time.Time { + if o == nil || IsNil(o.LastPullWorkflowAt) { + var ret time.Time + return ret + } + return *o.LastPullWorkflowAt +} + +// GetLastPullWorkflowAtOk returns a tuple with the LastPullWorkflowAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatecloudflareIntegration200Response) GetLastPullWorkflowAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastPullWorkflowAt) { + return nil, false + } + return o.LastPullWorkflowAt, true +} + +// HasLastPullWorkflowAt returns a boolean if a field has been set. +func (o *CreatecloudflareIntegration200Response) HasLastPullWorkflowAt() bool { + if o != nil && !IsNil(o.LastPullWorkflowAt) { + return true + } + + return false +} + +// SetLastPullWorkflowAt gets a reference to the given time.Time and assigns it to the LastPullWorkflowAt field. +func (o *CreatecloudflareIntegration200Response) SetLastPullWorkflowAt(v time.Time) { + o.LastPullWorkflowAt = &v +} + +// GetKind returns the Kind field value +func (o *CreatecloudflareIntegration200Response) GetKind() ENUMPROPERTIESDATAITEMSPROPERTIESKIND { + if o == nil { + var ret ENUMPROPERTIESDATAITEMSPROPERTIESKIND + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *CreatecloudflareIntegration200Response) GetKindOk() (*ENUMPROPERTIESDATAITEMSPROPERTIESKIND, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *CreatecloudflareIntegration200Response) SetKind(v ENUMPROPERTIESDATAITEMSPROPERTIESKIND) { + o.Kind = v +} + +// GetValid returns the Valid field value +func (o *CreatecloudflareIntegration200Response) GetValid() bool { + if o == nil { + var ret bool + return ret + } + + return o.Valid +} + +// GetValidOk returns a tuple with the Valid field value +// and a boolean to check if the value has been set. +func (o *CreatecloudflareIntegration200Response) GetValidOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Valid, true +} + +// SetValid sets field value +func (o *CreatecloudflareIntegration200Response) SetValid(v bool) { + o.Valid = v +} + +// GetValidationErrors returns the ValidationErrors field value +func (o *CreatecloudflareIntegration200Response) GetValidationErrors() []string { + if o == nil { + var ret []string + return ret + } + + return o.ValidationErrors +} + +// GetValidationErrorsOk returns a tuple with the ValidationErrors field value +// and a boolean to check if the value has been set. +func (o *CreatecloudflareIntegration200Response) GetValidationErrorsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ValidationErrors, true +} + +// SetValidationErrors sets field value +func (o *CreatecloudflareIntegration200Response) SetValidationErrors(v []string) { + o.ValidationErrors = v +} + +// GetOrganizationId returns the OrganizationId field value +func (o *CreatecloudflareIntegration200Response) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *CreatecloudflareIntegration200Response) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *CreatecloudflareIntegration200Response) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetProjects returns the Projects field value +func (o *CreatecloudflareIntegration200Response) GetProjects() []ListProjects200ResponseDataInner { + if o == nil { + var ret []ListProjects200ResponseDataInner + return ret + } + + return o.Projects +} + +// GetProjectsOk returns a tuple with the Projects field value +// and a boolean to check if the value has been set. +func (o *CreatecloudflareIntegration200Response) GetProjectsOk() ([]ListProjects200ResponseDataInner, bool) { + if o == nil { + return nil, false + } + return o.Projects, true +} + +// SetProjects sets field value +func (o *CreatecloudflareIntegration200Response) SetProjects(v []ListProjects200ResponseDataInner) { + o.Projects = v +} + +// GetParameters returns the Parameters field value +func (o *CreatecloudflareIntegration200Response) GetParameters() CreatecloudflareIntegrationRequestParameters { + if o == nil { + var ret CreatecloudflareIntegrationRequestParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreatecloudflareIntegration200Response) GetParametersOk() (*CreatecloudflareIntegrationRequestParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreatecloudflareIntegration200Response) SetParameters(v CreatecloudflareIntegrationRequestParameters) { + o.Parameters = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *CreatecloudflareIntegration200Response) GetLocation() LocationDetailed1 { + if o == nil || IsNil(o.Location) { + var ret LocationDetailed1 + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatecloudflareIntegration200Response) GetLocationOk() (*LocationDetailed1, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *CreatecloudflareIntegration200Response) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given LocationDetailed1 and assigns it to the Location field. +func (o *CreatecloudflareIntegration200Response) SetLocation(v LocationDetailed1) { + o.Location = &v +} + +func (o CreatecloudflareIntegration200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatecloudflareIntegration200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["createdAt"] = o.CreatedAt + toSerialize["updatedAt"] = o.UpdatedAt + if !IsNil(o.ScheduledForDeletionAt) { + toSerialize["scheduledForDeletionAt"] = o.ScheduledForDeletionAt + } + if !IsNil(o.LastPullWorkflowAt) { + toSerialize["lastPullWorkflowAt"] = o.LastPullWorkflowAt + } + toSerialize["kind"] = o.Kind + toSerialize["valid"] = o.Valid + toSerialize["validationErrors"] = o.ValidationErrors + toSerialize["organizationId"] = o.OrganizationId + toSerialize["projects"] = o.Projects + toSerialize["parameters"] = o.Parameters + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreatecloudflareIntegration200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "createdAt", + "updatedAt", + "kind", + "valid", + "validationErrors", + "organizationId", + "projects", + "parameters", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreatecloudflareIntegration200Response := _CreatecloudflareIntegration200Response{} + + err = json.Unmarshal(data, &varCreatecloudflareIntegration200Response) + + if err != nil { + return err + } + + *o = CreatecloudflareIntegration200Response(varCreatecloudflareIntegration200Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "createdAt") + delete(additionalProperties, "updatedAt") + delete(additionalProperties, "scheduledForDeletionAt") + delete(additionalProperties, "lastPullWorkflowAt") + delete(additionalProperties, "kind") + delete(additionalProperties, "valid") + delete(additionalProperties, "validationErrors") + delete(additionalProperties, "organizationId") + delete(additionalProperties, "projects") + delete(additionalProperties, "parameters") + delete(additionalProperties, "location") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreatecloudflareIntegration200Response struct { + value *CreatecloudflareIntegration200Response + isSet bool +} + +func (v NullableCreatecloudflareIntegration200Response) Get() *CreatecloudflareIntegration200Response { + return v.value +} + +func (v *NullableCreatecloudflareIntegration200Response) Set(val *CreatecloudflareIntegration200Response) { + v.value = val + v.isSet = true +} + +func (v NullableCreatecloudflareIntegration200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatecloudflareIntegration200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatecloudflareIntegration200Response(val *CreatecloudflareIntegration200Response) *NullableCreatecloudflareIntegration200Response { + return &NullableCreatecloudflareIntegration200Response{value: val, isSet: true} +} + +func (v NullableCreatecloudflareIntegration200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatecloudflareIntegration200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createcloudflare_integration_request.go b/pkg/api/v3/model_createcloudflare_integration_request.go new file mode 100644 index 00000000..f6b624a3 --- /dev/null +++ b/pkg/api/v3/model_createcloudflare_integration_request.go @@ -0,0 +1,304 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreatecloudflareIntegrationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatecloudflareIntegrationRequest{} + +// CreatecloudflareIntegrationRequest struct for CreatecloudflareIntegrationRequest +type CreatecloudflareIntegrationRequest struct { + // The organization ID to create the integration for + OrganizationId string `json:"organizationId"` + // The name of the integration + Name string `json:"name"` + Parameters CreatecloudflareIntegrationRequestParameters `json:"parameters"` + // Optional proxy ID to create the integration for + ProxyId *string `json:"proxyId,omitempty"` + // Optional list of project IDs to create the integration for + ProjectIds []string `json:"projectIds,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreatecloudflareIntegrationRequest CreatecloudflareIntegrationRequest + +// NewCreatecloudflareIntegrationRequest instantiates a new CreatecloudflareIntegrationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreatecloudflareIntegrationRequest(organizationId string, name string, parameters CreatecloudflareIntegrationRequestParameters) *CreatecloudflareIntegrationRequest { + this := CreatecloudflareIntegrationRequest{} + this.OrganizationId = organizationId + this.Name = name + this.Parameters = parameters + return &this +} + +// NewCreatecloudflareIntegrationRequestWithDefaults instantiates a new CreatecloudflareIntegrationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreatecloudflareIntegrationRequestWithDefaults() *CreatecloudflareIntegrationRequest { + this := CreatecloudflareIntegrationRequest{} + return &this +} + +// GetOrganizationId returns the OrganizationId field value +func (o *CreatecloudflareIntegrationRequest) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *CreatecloudflareIntegrationRequest) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *CreatecloudflareIntegrationRequest) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetName returns the Name field value +func (o *CreatecloudflareIntegrationRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreatecloudflareIntegrationRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreatecloudflareIntegrationRequest) SetName(v string) { + o.Name = v +} + +// GetParameters returns the Parameters field value +func (o *CreatecloudflareIntegrationRequest) GetParameters() CreatecloudflareIntegrationRequestParameters { + if o == nil { + var ret CreatecloudflareIntegrationRequestParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreatecloudflareIntegrationRequest) GetParametersOk() (*CreatecloudflareIntegrationRequestParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreatecloudflareIntegrationRequest) SetParameters(v CreatecloudflareIntegrationRequestParameters) { + o.Parameters = v +} + +// GetProxyId returns the ProxyId field value if set, zero value otherwise. +func (o *CreatecloudflareIntegrationRequest) GetProxyId() string { + if o == nil || IsNil(o.ProxyId) { + var ret string + return ret + } + return *o.ProxyId +} + +// GetProxyIdOk returns a tuple with the ProxyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatecloudflareIntegrationRequest) GetProxyIdOk() (*string, bool) { + if o == nil || IsNil(o.ProxyId) { + return nil, false + } + return o.ProxyId, true +} + +// HasProxyId returns a boolean if a field has been set. +func (o *CreatecloudflareIntegrationRequest) HasProxyId() bool { + if o != nil && !IsNil(o.ProxyId) { + return true + } + + return false +} + +// SetProxyId gets a reference to the given string and assigns it to the ProxyId field. +func (o *CreatecloudflareIntegrationRequest) SetProxyId(v string) { + o.ProxyId = &v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreatecloudflareIntegrationRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatecloudflareIntegrationRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreatecloudflareIntegrationRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreatecloudflareIntegrationRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o CreatecloudflareIntegrationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatecloudflareIntegrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["organizationId"] = o.OrganizationId + toSerialize["name"] = o.Name + toSerialize["parameters"] = o.Parameters + if !IsNil(o.ProxyId) { + toSerialize["proxyId"] = o.ProxyId + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreatecloudflareIntegrationRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "organizationId", + "name", + "parameters", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreatecloudflareIntegrationRequest := _CreatecloudflareIntegrationRequest{} + + err = json.Unmarshal(data, &varCreatecloudflareIntegrationRequest) + + if err != nil { + return err + } + + *o = CreatecloudflareIntegrationRequest(varCreatecloudflareIntegrationRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "organizationId") + delete(additionalProperties, "name") + delete(additionalProperties, "parameters") + delete(additionalProperties, "proxyId") + delete(additionalProperties, "projectIds") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreatecloudflareIntegrationRequest struct { + value *CreatecloudflareIntegrationRequest + isSet bool +} + +func (v NullableCreatecloudflareIntegrationRequest) Get() *CreatecloudflareIntegrationRequest { + return v.value +} + +func (v *NullableCreatecloudflareIntegrationRequest) Set(val *CreatecloudflareIntegrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreatecloudflareIntegrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatecloudflareIntegrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatecloudflareIntegrationRequest(val *CreatecloudflareIntegrationRequest) *NullableCreatecloudflareIntegrationRequest { + return &NullableCreatecloudflareIntegrationRequest{value: val, isSet: true} +} + +func (v NullableCreatecloudflareIntegrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatecloudflareIntegrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createcloudflare_integration_request_parameters.go b/pkg/api/v3/model_createcloudflare_integration_request_parameters.go new file mode 100644 index 00000000..5e05f73a --- /dev/null +++ b/pkg/api/v3/model_createcloudflare_integration_request_parameters.go @@ -0,0 +1,168 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreatecloudflareIntegrationRequestParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatecloudflareIntegrationRequestParameters{} + +// CreatecloudflareIntegrationRequestParameters The parameters of the integration +type CreatecloudflareIntegrationRequestParameters struct { + ApiKey string `json:"api_key"` + AdditionalProperties map[string]interface{} +} + +type _CreatecloudflareIntegrationRequestParameters CreatecloudflareIntegrationRequestParameters + +// NewCreatecloudflareIntegrationRequestParameters instantiates a new CreatecloudflareIntegrationRequestParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreatecloudflareIntegrationRequestParameters(apiKey string) *CreatecloudflareIntegrationRequestParameters { + this := CreatecloudflareIntegrationRequestParameters{} + this.ApiKey = apiKey + return &this +} + +// NewCreatecloudflareIntegrationRequestParametersWithDefaults instantiates a new CreatecloudflareIntegrationRequestParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreatecloudflareIntegrationRequestParametersWithDefaults() *CreatecloudflareIntegrationRequestParameters { + this := CreatecloudflareIntegrationRequestParameters{} + return &this +} + +// GetApiKey returns the ApiKey field value +func (o *CreatecloudflareIntegrationRequestParameters) GetApiKey() string { + if o == nil { + var ret string + return ret + } + + return o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value +// and a boolean to check if the value has been set. +func (o *CreatecloudflareIntegrationRequestParameters) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiKey, true +} + +// SetApiKey sets field value +func (o *CreatecloudflareIntegrationRequestParameters) SetApiKey(v string) { + o.ApiKey = v +} + +func (o CreatecloudflareIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatecloudflareIntegrationRequestParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["api_key"] = o.ApiKey + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreatecloudflareIntegrationRequestParameters) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "api_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreatecloudflareIntegrationRequestParameters := _CreatecloudflareIntegrationRequestParameters{} + + err = json.Unmarshal(data, &varCreatecloudflareIntegrationRequestParameters) + + if err != nil { + return err + } + + *o = CreatecloudflareIntegrationRequestParameters(varCreatecloudflareIntegrationRequestParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "api_key") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreatecloudflareIntegrationRequestParameters struct { + value *CreatecloudflareIntegrationRequestParameters + isSet bool +} + +func (v NullableCreatecloudflareIntegrationRequestParameters) Get() *CreatecloudflareIntegrationRequestParameters { + return v.value +} + +func (v *NullableCreatecloudflareIntegrationRequestParameters) Set(val *CreatecloudflareIntegrationRequestParameters) { + v.value = val + v.isSet = true +} + +func (v NullableCreatecloudflareIntegrationRequestParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatecloudflareIntegrationRequestParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatecloudflareIntegrationRequestParameters(val *CreatecloudflareIntegrationRequestParameters) *NullableCreatecloudflareIntegrationRequestParameters { + return &NullableCreatecloudflareIntegrationRequestParameters{value: val, isSet: true} +} + +func (v NullableCreatecloudflareIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatecloudflareIntegrationRequestParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_creategitlab_integration_200_response.go b/pkg/api/v3/model_creategitlab_integration_200_response.go new file mode 100644 index 00000000..f66e8626 --- /dev/null +++ b/pkg/api/v3/model_creategitlab_integration_200_response.go @@ -0,0 +1,551 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "time" + "fmt" +) + +// checks if the CreategitlabIntegration200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreategitlabIntegration200Response{} + +// CreategitlabIntegration200Response struct for CreategitlabIntegration200Response +type CreategitlabIntegration200Response struct { + // The id of the integration + Id string `json:"id"` + // The name of the integration + Name string `json:"name"` + // The date and time the integration was created + CreatedAt time.Time `json:"createdAt"` + // The date and time the integration was last updated + UpdatedAt time.Time `json:"updatedAt"` + // The date and time the integration is scheduled for deletion + ScheduledForDeletionAt *time.Time `json:"scheduledForDeletionAt,omitempty"` + // The date and time the last pull workflow was executed + LastPullWorkflowAt *time.Time `json:"lastPullWorkflowAt,omitempty"` + Kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND `json:"kind"` + // Whether the integration is valid + Valid bool `json:"valid"` + // The validation errors of the integration + ValidationErrors []string `json:"validationErrors"` + // The id of the organization the integration belongs to + OrganizationId string `json:"organizationId"` + // The projects of the integration + Projects []ListProjects200ResponseDataInner `json:"projects"` + Parameters CreategitlabIntegrationRequestParameters `json:"parameters"` + Location *LocationDetailed1 `json:"location,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreategitlabIntegration200Response CreategitlabIntegration200Response + +// NewCreategitlabIntegration200Response instantiates a new CreategitlabIntegration200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreategitlabIntegration200Response(id string, name string, createdAt time.Time, updatedAt time.Time, kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND, valid bool, validationErrors []string, organizationId string, projects []ListProjects200ResponseDataInner, parameters CreategitlabIntegrationRequestParameters) *CreategitlabIntegration200Response { + this := CreategitlabIntegration200Response{} + this.Id = id + this.Name = name + this.CreatedAt = createdAt + this.UpdatedAt = updatedAt + this.Kind = kind + this.Valid = valid + this.ValidationErrors = validationErrors + this.OrganizationId = organizationId + this.Projects = projects + this.Parameters = parameters + return &this +} + +// NewCreategitlabIntegration200ResponseWithDefaults instantiates a new CreategitlabIntegration200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreategitlabIntegration200ResponseWithDefaults() *CreategitlabIntegration200Response { + this := CreategitlabIntegration200Response{} + return &this +} + +// GetId returns the Id field value +func (o *CreategitlabIntegration200Response) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CreategitlabIntegration200Response) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CreategitlabIntegration200Response) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *CreategitlabIntegration200Response) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreategitlabIntegration200Response) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreategitlabIntegration200Response) SetName(v string) { + o.Name = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *CreategitlabIntegration200Response) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *CreategitlabIntegration200Response) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *CreategitlabIntegration200Response) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *CreategitlabIntegration200Response) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *CreategitlabIntegration200Response) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *CreategitlabIntegration200Response) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +// GetScheduledForDeletionAt returns the ScheduledForDeletionAt field value if set, zero value otherwise. +func (o *CreategitlabIntegration200Response) GetScheduledForDeletionAt() time.Time { + if o == nil || IsNil(o.ScheduledForDeletionAt) { + var ret time.Time + return ret + } + return *o.ScheduledForDeletionAt +} + +// GetScheduledForDeletionAtOk returns a tuple with the ScheduledForDeletionAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreategitlabIntegration200Response) GetScheduledForDeletionAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.ScheduledForDeletionAt) { + return nil, false + } + return o.ScheduledForDeletionAt, true +} + +// HasScheduledForDeletionAt returns a boolean if a field has been set. +func (o *CreategitlabIntegration200Response) HasScheduledForDeletionAt() bool { + if o != nil && !IsNil(o.ScheduledForDeletionAt) { + return true + } + + return false +} + +// SetScheduledForDeletionAt gets a reference to the given time.Time and assigns it to the ScheduledForDeletionAt field. +func (o *CreategitlabIntegration200Response) SetScheduledForDeletionAt(v time.Time) { + o.ScheduledForDeletionAt = &v +} + +// GetLastPullWorkflowAt returns the LastPullWorkflowAt field value if set, zero value otherwise. +func (o *CreategitlabIntegration200Response) GetLastPullWorkflowAt() time.Time { + if o == nil || IsNil(o.LastPullWorkflowAt) { + var ret time.Time + return ret + } + return *o.LastPullWorkflowAt +} + +// GetLastPullWorkflowAtOk returns a tuple with the LastPullWorkflowAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreategitlabIntegration200Response) GetLastPullWorkflowAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastPullWorkflowAt) { + return nil, false + } + return o.LastPullWorkflowAt, true +} + +// HasLastPullWorkflowAt returns a boolean if a field has been set. +func (o *CreategitlabIntegration200Response) HasLastPullWorkflowAt() bool { + if o != nil && !IsNil(o.LastPullWorkflowAt) { + return true + } + + return false +} + +// SetLastPullWorkflowAt gets a reference to the given time.Time and assigns it to the LastPullWorkflowAt field. +func (o *CreategitlabIntegration200Response) SetLastPullWorkflowAt(v time.Time) { + o.LastPullWorkflowAt = &v +} + +// GetKind returns the Kind field value +func (o *CreategitlabIntegration200Response) GetKind() ENUMPROPERTIESDATAITEMSPROPERTIESKIND { + if o == nil { + var ret ENUMPROPERTIESDATAITEMSPROPERTIESKIND + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *CreategitlabIntegration200Response) GetKindOk() (*ENUMPROPERTIESDATAITEMSPROPERTIESKIND, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *CreategitlabIntegration200Response) SetKind(v ENUMPROPERTIESDATAITEMSPROPERTIESKIND) { + o.Kind = v +} + +// GetValid returns the Valid field value +func (o *CreategitlabIntegration200Response) GetValid() bool { + if o == nil { + var ret bool + return ret + } + + return o.Valid +} + +// GetValidOk returns a tuple with the Valid field value +// and a boolean to check if the value has been set. +func (o *CreategitlabIntegration200Response) GetValidOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Valid, true +} + +// SetValid sets field value +func (o *CreategitlabIntegration200Response) SetValid(v bool) { + o.Valid = v +} + +// GetValidationErrors returns the ValidationErrors field value +func (o *CreategitlabIntegration200Response) GetValidationErrors() []string { + if o == nil { + var ret []string + return ret + } + + return o.ValidationErrors +} + +// GetValidationErrorsOk returns a tuple with the ValidationErrors field value +// and a boolean to check if the value has been set. +func (o *CreategitlabIntegration200Response) GetValidationErrorsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ValidationErrors, true +} + +// SetValidationErrors sets field value +func (o *CreategitlabIntegration200Response) SetValidationErrors(v []string) { + o.ValidationErrors = v +} + +// GetOrganizationId returns the OrganizationId field value +func (o *CreategitlabIntegration200Response) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *CreategitlabIntegration200Response) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *CreategitlabIntegration200Response) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetProjects returns the Projects field value +func (o *CreategitlabIntegration200Response) GetProjects() []ListProjects200ResponseDataInner { + if o == nil { + var ret []ListProjects200ResponseDataInner + return ret + } + + return o.Projects +} + +// GetProjectsOk returns a tuple with the Projects field value +// and a boolean to check if the value has been set. +func (o *CreategitlabIntegration200Response) GetProjectsOk() ([]ListProjects200ResponseDataInner, bool) { + if o == nil { + return nil, false + } + return o.Projects, true +} + +// SetProjects sets field value +func (o *CreategitlabIntegration200Response) SetProjects(v []ListProjects200ResponseDataInner) { + o.Projects = v +} + +// GetParameters returns the Parameters field value +func (o *CreategitlabIntegration200Response) GetParameters() CreategitlabIntegrationRequestParameters { + if o == nil { + var ret CreategitlabIntegrationRequestParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreategitlabIntegration200Response) GetParametersOk() (*CreategitlabIntegrationRequestParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreategitlabIntegration200Response) SetParameters(v CreategitlabIntegrationRequestParameters) { + o.Parameters = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *CreategitlabIntegration200Response) GetLocation() LocationDetailed1 { + if o == nil || IsNil(o.Location) { + var ret LocationDetailed1 + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreategitlabIntegration200Response) GetLocationOk() (*LocationDetailed1, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *CreategitlabIntegration200Response) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given LocationDetailed1 and assigns it to the Location field. +func (o *CreategitlabIntegration200Response) SetLocation(v LocationDetailed1) { + o.Location = &v +} + +func (o CreategitlabIntegration200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreategitlabIntegration200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["createdAt"] = o.CreatedAt + toSerialize["updatedAt"] = o.UpdatedAt + if !IsNil(o.ScheduledForDeletionAt) { + toSerialize["scheduledForDeletionAt"] = o.ScheduledForDeletionAt + } + if !IsNil(o.LastPullWorkflowAt) { + toSerialize["lastPullWorkflowAt"] = o.LastPullWorkflowAt + } + toSerialize["kind"] = o.Kind + toSerialize["valid"] = o.Valid + toSerialize["validationErrors"] = o.ValidationErrors + toSerialize["organizationId"] = o.OrganizationId + toSerialize["projects"] = o.Projects + toSerialize["parameters"] = o.Parameters + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreategitlabIntegration200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "createdAt", + "updatedAt", + "kind", + "valid", + "validationErrors", + "organizationId", + "projects", + "parameters", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreategitlabIntegration200Response := _CreategitlabIntegration200Response{} + + err = json.Unmarshal(data, &varCreategitlabIntegration200Response) + + if err != nil { + return err + } + + *o = CreategitlabIntegration200Response(varCreategitlabIntegration200Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "createdAt") + delete(additionalProperties, "updatedAt") + delete(additionalProperties, "scheduledForDeletionAt") + delete(additionalProperties, "lastPullWorkflowAt") + delete(additionalProperties, "kind") + delete(additionalProperties, "valid") + delete(additionalProperties, "validationErrors") + delete(additionalProperties, "organizationId") + delete(additionalProperties, "projects") + delete(additionalProperties, "parameters") + delete(additionalProperties, "location") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreategitlabIntegration200Response struct { + value *CreategitlabIntegration200Response + isSet bool +} + +func (v NullableCreategitlabIntegration200Response) Get() *CreategitlabIntegration200Response { + return v.value +} + +func (v *NullableCreategitlabIntegration200Response) Set(val *CreategitlabIntegration200Response) { + v.value = val + v.isSet = true +} + +func (v NullableCreategitlabIntegration200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCreategitlabIntegration200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreategitlabIntegration200Response(val *CreategitlabIntegration200Response) *NullableCreategitlabIntegration200Response { + return &NullableCreategitlabIntegration200Response{value: val, isSet: true} +} + +func (v NullableCreategitlabIntegration200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreategitlabIntegration200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_creategitlab_integration_request.go b/pkg/api/v3/model_creategitlab_integration_request.go new file mode 100644 index 00000000..e8f0b9f6 --- /dev/null +++ b/pkg/api/v3/model_creategitlab_integration_request.go @@ -0,0 +1,304 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreategitlabIntegrationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreategitlabIntegrationRequest{} + +// CreategitlabIntegrationRequest struct for CreategitlabIntegrationRequest +type CreategitlabIntegrationRequest struct { + // The organization ID to create the integration for + OrganizationId string `json:"organizationId"` + // The name of the integration + Name string `json:"name"` + Parameters CreategitlabIntegrationRequestParameters `json:"parameters"` + // Optional proxy ID to create the integration for + ProxyId *string `json:"proxyId,omitempty"` + // Optional list of project IDs to create the integration for + ProjectIds []string `json:"projectIds,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreategitlabIntegrationRequest CreategitlabIntegrationRequest + +// NewCreategitlabIntegrationRequest instantiates a new CreategitlabIntegrationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreategitlabIntegrationRequest(organizationId string, name string, parameters CreategitlabIntegrationRequestParameters) *CreategitlabIntegrationRequest { + this := CreategitlabIntegrationRequest{} + this.OrganizationId = organizationId + this.Name = name + this.Parameters = parameters + return &this +} + +// NewCreategitlabIntegrationRequestWithDefaults instantiates a new CreategitlabIntegrationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreategitlabIntegrationRequestWithDefaults() *CreategitlabIntegrationRequest { + this := CreategitlabIntegrationRequest{} + return &this +} + +// GetOrganizationId returns the OrganizationId field value +func (o *CreategitlabIntegrationRequest) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *CreategitlabIntegrationRequest) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *CreategitlabIntegrationRequest) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetName returns the Name field value +func (o *CreategitlabIntegrationRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreategitlabIntegrationRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreategitlabIntegrationRequest) SetName(v string) { + o.Name = v +} + +// GetParameters returns the Parameters field value +func (o *CreategitlabIntegrationRequest) GetParameters() CreategitlabIntegrationRequestParameters { + if o == nil { + var ret CreategitlabIntegrationRequestParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreategitlabIntegrationRequest) GetParametersOk() (*CreategitlabIntegrationRequestParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreategitlabIntegrationRequest) SetParameters(v CreategitlabIntegrationRequestParameters) { + o.Parameters = v +} + +// GetProxyId returns the ProxyId field value if set, zero value otherwise. +func (o *CreategitlabIntegrationRequest) GetProxyId() string { + if o == nil || IsNil(o.ProxyId) { + var ret string + return ret + } + return *o.ProxyId +} + +// GetProxyIdOk returns a tuple with the ProxyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreategitlabIntegrationRequest) GetProxyIdOk() (*string, bool) { + if o == nil || IsNil(o.ProxyId) { + return nil, false + } + return o.ProxyId, true +} + +// HasProxyId returns a boolean if a field has been set. +func (o *CreategitlabIntegrationRequest) HasProxyId() bool { + if o != nil && !IsNil(o.ProxyId) { + return true + } + + return false +} + +// SetProxyId gets a reference to the given string and assigns it to the ProxyId field. +func (o *CreategitlabIntegrationRequest) SetProxyId(v string) { + o.ProxyId = &v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreategitlabIntegrationRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreategitlabIntegrationRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreategitlabIntegrationRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreategitlabIntegrationRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o CreategitlabIntegrationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreategitlabIntegrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["organizationId"] = o.OrganizationId + toSerialize["name"] = o.Name + toSerialize["parameters"] = o.Parameters + if !IsNil(o.ProxyId) { + toSerialize["proxyId"] = o.ProxyId + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreategitlabIntegrationRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "organizationId", + "name", + "parameters", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreategitlabIntegrationRequest := _CreategitlabIntegrationRequest{} + + err = json.Unmarshal(data, &varCreategitlabIntegrationRequest) + + if err != nil { + return err + } + + *o = CreategitlabIntegrationRequest(varCreategitlabIntegrationRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "organizationId") + delete(additionalProperties, "name") + delete(additionalProperties, "parameters") + delete(additionalProperties, "proxyId") + delete(additionalProperties, "projectIds") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreategitlabIntegrationRequest struct { + value *CreategitlabIntegrationRequest + isSet bool +} + +func (v NullableCreategitlabIntegrationRequest) Get() *CreategitlabIntegrationRequest { + return v.value +} + +func (v *NullableCreategitlabIntegrationRequest) Set(val *CreategitlabIntegrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreategitlabIntegrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreategitlabIntegrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreategitlabIntegrationRequest(val *CreategitlabIntegrationRequest) *NullableCreategitlabIntegrationRequest { + return &NullableCreategitlabIntegrationRequest{value: val, isSet: true} +} + +func (v NullableCreategitlabIntegrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreategitlabIntegrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_creategitlab_integration_request_parameters.go b/pkg/api/v3/model_creategitlab_integration_request_parameters.go new file mode 100644 index 00000000..8b5b7550 --- /dev/null +++ b/pkg/api/v3/model_creategitlab_integration_request_parameters.go @@ -0,0 +1,205 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreategitlabIntegrationRequestParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreategitlabIntegrationRequestParameters{} + +// CreategitlabIntegrationRequestParameters The parameters of the integration +type CreategitlabIntegrationRequestParameters struct { + ApiKey string `json:"api_key"` + InstanceUrl *string `json:"instance_url,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreategitlabIntegrationRequestParameters CreategitlabIntegrationRequestParameters + +// NewCreategitlabIntegrationRequestParameters instantiates a new CreategitlabIntegrationRequestParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreategitlabIntegrationRequestParameters(apiKey string) *CreategitlabIntegrationRequestParameters { + this := CreategitlabIntegrationRequestParameters{} + this.ApiKey = apiKey + return &this +} + +// NewCreategitlabIntegrationRequestParametersWithDefaults instantiates a new CreategitlabIntegrationRequestParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreategitlabIntegrationRequestParametersWithDefaults() *CreategitlabIntegrationRequestParameters { + this := CreategitlabIntegrationRequestParameters{} + return &this +} + +// GetApiKey returns the ApiKey field value +func (o *CreategitlabIntegrationRequestParameters) GetApiKey() string { + if o == nil { + var ret string + return ret + } + + return o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value +// and a boolean to check if the value has been set. +func (o *CreategitlabIntegrationRequestParameters) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiKey, true +} + +// SetApiKey sets field value +func (o *CreategitlabIntegrationRequestParameters) SetApiKey(v string) { + o.ApiKey = v +} + +// GetInstanceUrl returns the InstanceUrl field value if set, zero value otherwise. +func (o *CreategitlabIntegrationRequestParameters) GetInstanceUrl() string { + if o == nil || IsNil(o.InstanceUrl) { + var ret string + return ret + } + return *o.InstanceUrl +} + +// GetInstanceUrlOk returns a tuple with the InstanceUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreategitlabIntegrationRequestParameters) GetInstanceUrlOk() (*string, bool) { + if o == nil || IsNil(o.InstanceUrl) { + return nil, false + } + return o.InstanceUrl, true +} + +// HasInstanceUrl returns a boolean if a field has been set. +func (o *CreategitlabIntegrationRequestParameters) HasInstanceUrl() bool { + if o != nil && !IsNil(o.InstanceUrl) { + return true + } + + return false +} + +// SetInstanceUrl gets a reference to the given string and assigns it to the InstanceUrl field. +func (o *CreategitlabIntegrationRequestParameters) SetInstanceUrl(v string) { + o.InstanceUrl = &v +} + +func (o CreategitlabIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreategitlabIntegrationRequestParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["api_key"] = o.ApiKey + if !IsNil(o.InstanceUrl) { + toSerialize["instance_url"] = o.InstanceUrl + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreategitlabIntegrationRequestParameters) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "api_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreategitlabIntegrationRequestParameters := _CreategitlabIntegrationRequestParameters{} + + err = json.Unmarshal(data, &varCreategitlabIntegrationRequestParameters) + + if err != nil { + return err + } + + *o = CreategitlabIntegrationRequestParameters(varCreategitlabIntegrationRequestParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "api_key") + delete(additionalProperties, "instance_url") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreategitlabIntegrationRequestParameters struct { + value *CreategitlabIntegrationRequestParameters + isSet bool +} + +func (v NullableCreategitlabIntegrationRequestParameters) Get() *CreategitlabIntegrationRequestParameters { + return v.value +} + +func (v *NullableCreategitlabIntegrationRequestParameters) Set(val *CreategitlabIntegrationRequestParameters) { + v.value = val + v.isSet = true +} + +func (v NullableCreategitlabIntegrationRequestParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableCreategitlabIntegrationRequestParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreategitlabIntegrationRequestParameters(val *CreategitlabIntegrationRequestParameters) *NullableCreategitlabIntegrationRequestParameters { + return &NullableCreategitlabIntegrationRequestParameters{value: val, isSet: true} +} + +func (v NullableCreategitlabIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreategitlabIntegrationRequestParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createjira_integration_200_response.go b/pkg/api/v3/model_createjira_integration_200_response.go new file mode 100644 index 00000000..2a7da11e --- /dev/null +++ b/pkg/api/v3/model_createjira_integration_200_response.go @@ -0,0 +1,551 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "time" + "fmt" +) + +// checks if the CreatejiraIntegration200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatejiraIntegration200Response{} + +// CreatejiraIntegration200Response struct for CreatejiraIntegration200Response +type CreatejiraIntegration200Response struct { + // The id of the integration + Id string `json:"id"` + // The name of the integration + Name string `json:"name"` + // The date and time the integration was created + CreatedAt time.Time `json:"createdAt"` + // The date and time the integration was last updated + UpdatedAt time.Time `json:"updatedAt"` + // The date and time the integration is scheduled for deletion + ScheduledForDeletionAt *time.Time `json:"scheduledForDeletionAt,omitempty"` + // The date and time the last pull workflow was executed + LastPullWorkflowAt *time.Time `json:"lastPullWorkflowAt,omitempty"` + Kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND `json:"kind"` + // Whether the integration is valid + Valid bool `json:"valid"` + // The validation errors of the integration + ValidationErrors []string `json:"validationErrors"` + // The id of the organization the integration belongs to + OrganizationId string `json:"organizationId"` + // The projects of the integration + Projects []ListProjects200ResponseDataInner `json:"projects"` + Parameters CreatejiraIntegrationRequestParameters `json:"parameters"` + Location *LocationDetailed1 `json:"location,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreatejiraIntegration200Response CreatejiraIntegration200Response + +// NewCreatejiraIntegration200Response instantiates a new CreatejiraIntegration200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreatejiraIntegration200Response(id string, name string, createdAt time.Time, updatedAt time.Time, kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND, valid bool, validationErrors []string, organizationId string, projects []ListProjects200ResponseDataInner, parameters CreatejiraIntegrationRequestParameters) *CreatejiraIntegration200Response { + this := CreatejiraIntegration200Response{} + this.Id = id + this.Name = name + this.CreatedAt = createdAt + this.UpdatedAt = updatedAt + this.Kind = kind + this.Valid = valid + this.ValidationErrors = validationErrors + this.OrganizationId = organizationId + this.Projects = projects + this.Parameters = parameters + return &this +} + +// NewCreatejiraIntegration200ResponseWithDefaults instantiates a new CreatejiraIntegration200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreatejiraIntegration200ResponseWithDefaults() *CreatejiraIntegration200Response { + this := CreatejiraIntegration200Response{} + return &this +} + +// GetId returns the Id field value +func (o *CreatejiraIntegration200Response) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegration200Response) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CreatejiraIntegration200Response) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *CreatejiraIntegration200Response) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegration200Response) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreatejiraIntegration200Response) SetName(v string) { + o.Name = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *CreatejiraIntegration200Response) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegration200Response) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *CreatejiraIntegration200Response) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *CreatejiraIntegration200Response) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegration200Response) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *CreatejiraIntegration200Response) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +// GetScheduledForDeletionAt returns the ScheduledForDeletionAt field value if set, zero value otherwise. +func (o *CreatejiraIntegration200Response) GetScheduledForDeletionAt() time.Time { + if o == nil || IsNil(o.ScheduledForDeletionAt) { + var ret time.Time + return ret + } + return *o.ScheduledForDeletionAt +} + +// GetScheduledForDeletionAtOk returns a tuple with the ScheduledForDeletionAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegration200Response) GetScheduledForDeletionAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.ScheduledForDeletionAt) { + return nil, false + } + return o.ScheduledForDeletionAt, true +} + +// HasScheduledForDeletionAt returns a boolean if a field has been set. +func (o *CreatejiraIntegration200Response) HasScheduledForDeletionAt() bool { + if o != nil && !IsNil(o.ScheduledForDeletionAt) { + return true + } + + return false +} + +// SetScheduledForDeletionAt gets a reference to the given time.Time and assigns it to the ScheduledForDeletionAt field. +func (o *CreatejiraIntegration200Response) SetScheduledForDeletionAt(v time.Time) { + o.ScheduledForDeletionAt = &v +} + +// GetLastPullWorkflowAt returns the LastPullWorkflowAt field value if set, zero value otherwise. +func (o *CreatejiraIntegration200Response) GetLastPullWorkflowAt() time.Time { + if o == nil || IsNil(o.LastPullWorkflowAt) { + var ret time.Time + return ret + } + return *o.LastPullWorkflowAt +} + +// GetLastPullWorkflowAtOk returns a tuple with the LastPullWorkflowAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegration200Response) GetLastPullWorkflowAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastPullWorkflowAt) { + return nil, false + } + return o.LastPullWorkflowAt, true +} + +// HasLastPullWorkflowAt returns a boolean if a field has been set. +func (o *CreatejiraIntegration200Response) HasLastPullWorkflowAt() bool { + if o != nil && !IsNil(o.LastPullWorkflowAt) { + return true + } + + return false +} + +// SetLastPullWorkflowAt gets a reference to the given time.Time and assigns it to the LastPullWorkflowAt field. +func (o *CreatejiraIntegration200Response) SetLastPullWorkflowAt(v time.Time) { + o.LastPullWorkflowAt = &v +} + +// GetKind returns the Kind field value +func (o *CreatejiraIntegration200Response) GetKind() ENUMPROPERTIESDATAITEMSPROPERTIESKIND { + if o == nil { + var ret ENUMPROPERTIESDATAITEMSPROPERTIESKIND + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegration200Response) GetKindOk() (*ENUMPROPERTIESDATAITEMSPROPERTIESKIND, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *CreatejiraIntegration200Response) SetKind(v ENUMPROPERTIESDATAITEMSPROPERTIESKIND) { + o.Kind = v +} + +// GetValid returns the Valid field value +func (o *CreatejiraIntegration200Response) GetValid() bool { + if o == nil { + var ret bool + return ret + } + + return o.Valid +} + +// GetValidOk returns a tuple with the Valid field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegration200Response) GetValidOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Valid, true +} + +// SetValid sets field value +func (o *CreatejiraIntegration200Response) SetValid(v bool) { + o.Valid = v +} + +// GetValidationErrors returns the ValidationErrors field value +func (o *CreatejiraIntegration200Response) GetValidationErrors() []string { + if o == nil { + var ret []string + return ret + } + + return o.ValidationErrors +} + +// GetValidationErrorsOk returns a tuple with the ValidationErrors field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegration200Response) GetValidationErrorsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ValidationErrors, true +} + +// SetValidationErrors sets field value +func (o *CreatejiraIntegration200Response) SetValidationErrors(v []string) { + o.ValidationErrors = v +} + +// GetOrganizationId returns the OrganizationId field value +func (o *CreatejiraIntegration200Response) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegration200Response) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *CreatejiraIntegration200Response) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetProjects returns the Projects field value +func (o *CreatejiraIntegration200Response) GetProjects() []ListProjects200ResponseDataInner { + if o == nil { + var ret []ListProjects200ResponseDataInner + return ret + } + + return o.Projects +} + +// GetProjectsOk returns a tuple with the Projects field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegration200Response) GetProjectsOk() ([]ListProjects200ResponseDataInner, bool) { + if o == nil { + return nil, false + } + return o.Projects, true +} + +// SetProjects sets field value +func (o *CreatejiraIntegration200Response) SetProjects(v []ListProjects200ResponseDataInner) { + o.Projects = v +} + +// GetParameters returns the Parameters field value +func (o *CreatejiraIntegration200Response) GetParameters() CreatejiraIntegrationRequestParameters { + if o == nil { + var ret CreatejiraIntegrationRequestParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegration200Response) GetParametersOk() (*CreatejiraIntegrationRequestParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreatejiraIntegration200Response) SetParameters(v CreatejiraIntegrationRequestParameters) { + o.Parameters = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *CreatejiraIntegration200Response) GetLocation() LocationDetailed1 { + if o == nil || IsNil(o.Location) { + var ret LocationDetailed1 + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegration200Response) GetLocationOk() (*LocationDetailed1, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *CreatejiraIntegration200Response) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given LocationDetailed1 and assigns it to the Location field. +func (o *CreatejiraIntegration200Response) SetLocation(v LocationDetailed1) { + o.Location = &v +} + +func (o CreatejiraIntegration200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatejiraIntegration200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["createdAt"] = o.CreatedAt + toSerialize["updatedAt"] = o.UpdatedAt + if !IsNil(o.ScheduledForDeletionAt) { + toSerialize["scheduledForDeletionAt"] = o.ScheduledForDeletionAt + } + if !IsNil(o.LastPullWorkflowAt) { + toSerialize["lastPullWorkflowAt"] = o.LastPullWorkflowAt + } + toSerialize["kind"] = o.Kind + toSerialize["valid"] = o.Valid + toSerialize["validationErrors"] = o.ValidationErrors + toSerialize["organizationId"] = o.OrganizationId + toSerialize["projects"] = o.Projects + toSerialize["parameters"] = o.Parameters + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreatejiraIntegration200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "createdAt", + "updatedAt", + "kind", + "valid", + "validationErrors", + "organizationId", + "projects", + "parameters", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreatejiraIntegration200Response := _CreatejiraIntegration200Response{} + + err = json.Unmarshal(data, &varCreatejiraIntegration200Response) + + if err != nil { + return err + } + + *o = CreatejiraIntegration200Response(varCreatejiraIntegration200Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "createdAt") + delete(additionalProperties, "updatedAt") + delete(additionalProperties, "scheduledForDeletionAt") + delete(additionalProperties, "lastPullWorkflowAt") + delete(additionalProperties, "kind") + delete(additionalProperties, "valid") + delete(additionalProperties, "validationErrors") + delete(additionalProperties, "organizationId") + delete(additionalProperties, "projects") + delete(additionalProperties, "parameters") + delete(additionalProperties, "location") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreatejiraIntegration200Response struct { + value *CreatejiraIntegration200Response + isSet bool +} + +func (v NullableCreatejiraIntegration200Response) Get() *CreatejiraIntegration200Response { + return v.value +} + +func (v *NullableCreatejiraIntegration200Response) Set(val *CreatejiraIntegration200Response) { + v.value = val + v.isSet = true +} + +func (v NullableCreatejiraIntegration200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatejiraIntegration200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatejiraIntegration200Response(val *CreatejiraIntegration200Response) *NullableCreatejiraIntegration200Response { + return &NullableCreatejiraIntegration200Response{value: val, isSet: true} +} + +func (v NullableCreatejiraIntegration200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatejiraIntegration200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createjira_integration_request.go b/pkg/api/v3/model_createjira_integration_request.go new file mode 100644 index 00000000..134a1252 --- /dev/null +++ b/pkg/api/v3/model_createjira_integration_request.go @@ -0,0 +1,304 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreatejiraIntegrationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatejiraIntegrationRequest{} + +// CreatejiraIntegrationRequest struct for CreatejiraIntegrationRequest +type CreatejiraIntegrationRequest struct { + // The organization ID to create the integration for + OrganizationId string `json:"organizationId"` + // The name of the integration + Name string `json:"name"` + Parameters CreatejiraIntegrationRequestParameters `json:"parameters"` + // Optional proxy ID to create the integration for + ProxyId *string `json:"proxyId,omitempty"` + // Optional list of project IDs to create the integration for + ProjectIds []string `json:"projectIds,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreatejiraIntegrationRequest CreatejiraIntegrationRequest + +// NewCreatejiraIntegrationRequest instantiates a new CreatejiraIntegrationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreatejiraIntegrationRequest(organizationId string, name string, parameters CreatejiraIntegrationRequestParameters) *CreatejiraIntegrationRequest { + this := CreatejiraIntegrationRequest{} + this.OrganizationId = organizationId + this.Name = name + this.Parameters = parameters + return &this +} + +// NewCreatejiraIntegrationRequestWithDefaults instantiates a new CreatejiraIntegrationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreatejiraIntegrationRequestWithDefaults() *CreatejiraIntegrationRequest { + this := CreatejiraIntegrationRequest{} + return &this +} + +// GetOrganizationId returns the OrganizationId field value +func (o *CreatejiraIntegrationRequest) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequest) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *CreatejiraIntegrationRequest) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetName returns the Name field value +func (o *CreatejiraIntegrationRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreatejiraIntegrationRequest) SetName(v string) { + o.Name = v +} + +// GetParameters returns the Parameters field value +func (o *CreatejiraIntegrationRequest) GetParameters() CreatejiraIntegrationRequestParameters { + if o == nil { + var ret CreatejiraIntegrationRequestParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequest) GetParametersOk() (*CreatejiraIntegrationRequestParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreatejiraIntegrationRequest) SetParameters(v CreatejiraIntegrationRequestParameters) { + o.Parameters = v +} + +// GetProxyId returns the ProxyId field value if set, zero value otherwise. +func (o *CreatejiraIntegrationRequest) GetProxyId() string { + if o == nil || IsNil(o.ProxyId) { + var ret string + return ret + } + return *o.ProxyId +} + +// GetProxyIdOk returns a tuple with the ProxyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequest) GetProxyIdOk() (*string, bool) { + if o == nil || IsNil(o.ProxyId) { + return nil, false + } + return o.ProxyId, true +} + +// HasProxyId returns a boolean if a field has been set. +func (o *CreatejiraIntegrationRequest) HasProxyId() bool { + if o != nil && !IsNil(o.ProxyId) { + return true + } + + return false +} + +// SetProxyId gets a reference to the given string and assigns it to the ProxyId field. +func (o *CreatejiraIntegrationRequest) SetProxyId(v string) { + o.ProxyId = &v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreatejiraIntegrationRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreatejiraIntegrationRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreatejiraIntegrationRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o CreatejiraIntegrationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatejiraIntegrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["organizationId"] = o.OrganizationId + toSerialize["name"] = o.Name + toSerialize["parameters"] = o.Parameters + if !IsNil(o.ProxyId) { + toSerialize["proxyId"] = o.ProxyId + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreatejiraIntegrationRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "organizationId", + "name", + "parameters", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreatejiraIntegrationRequest := _CreatejiraIntegrationRequest{} + + err = json.Unmarshal(data, &varCreatejiraIntegrationRequest) + + if err != nil { + return err + } + + *o = CreatejiraIntegrationRequest(varCreatejiraIntegrationRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "organizationId") + delete(additionalProperties, "name") + delete(additionalProperties, "parameters") + delete(additionalProperties, "proxyId") + delete(additionalProperties, "projectIds") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreatejiraIntegrationRequest struct { + value *CreatejiraIntegrationRequest + isSet bool +} + +func (v NullableCreatejiraIntegrationRequest) Get() *CreatejiraIntegrationRequest { + return v.value +} + +func (v *NullableCreatejiraIntegrationRequest) Set(val *CreatejiraIntegrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreatejiraIntegrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatejiraIntegrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatejiraIntegrationRequest(val *CreatejiraIntegrationRequest) *NullableCreatejiraIntegrationRequest { + return &NullableCreatejiraIntegrationRequest{value: val, isSet: true} +} + +func (v NullableCreatejiraIntegrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatejiraIntegrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createjira_integration_request_parameters.go b/pkg/api/v3/model_createjira_integration_request_parameters.go new file mode 100644 index 00000000..302242fd --- /dev/null +++ b/pkg/api/v3/model_createjira_integration_request_parameters.go @@ -0,0 +1,477 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreatejiraIntegrationRequestParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatejiraIntegrationRequestParameters{} + +// CreatejiraIntegrationRequestParameters The parameters of the integration +type CreatejiraIntegrationRequestParameters struct { + Name string `json:"name"` + AccountId string `json:"account_id"` + InstanceUrl string `json:"instance_url"` + AuthMethod ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD `json:"auth_method"` + Email *string `json:"email,omitempty"` + ApiKey *string `json:"api_key,omitempty"` + Username *string `json:"username,omitempty"` + Password *string `json:"password,omitempty"` + ProxyId *string `json:"proxy_id,omitempty"` + Templates []CreatejiraIntegrationRequestParametersTemplatesInner `json:"templates,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreatejiraIntegrationRequestParameters CreatejiraIntegrationRequestParameters + +// NewCreatejiraIntegrationRequestParameters instantiates a new CreatejiraIntegrationRequestParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreatejiraIntegrationRequestParameters(name string, accountId string, instanceUrl string, authMethod ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD) *CreatejiraIntegrationRequestParameters { + this := CreatejiraIntegrationRequestParameters{} + this.Name = name + this.AccountId = accountId + this.InstanceUrl = instanceUrl + this.AuthMethod = authMethod + return &this +} + +// NewCreatejiraIntegrationRequestParametersWithDefaults instantiates a new CreatejiraIntegrationRequestParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreatejiraIntegrationRequestParametersWithDefaults() *CreatejiraIntegrationRequestParameters { + this := CreatejiraIntegrationRequestParameters{} + return &this +} + +// GetName returns the Name field value +func (o *CreatejiraIntegrationRequestParameters) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequestParameters) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreatejiraIntegrationRequestParameters) SetName(v string) { + o.Name = v +} + +// GetAccountId returns the AccountId field value +func (o *CreatejiraIntegrationRequestParameters) GetAccountId() string { + if o == nil { + var ret string + return ret + } + + return o.AccountId +} + +// GetAccountIdOk returns a tuple with the AccountId field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequestParameters) GetAccountIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccountId, true +} + +// SetAccountId sets field value +func (o *CreatejiraIntegrationRequestParameters) SetAccountId(v string) { + o.AccountId = v +} + +// GetInstanceUrl returns the InstanceUrl field value +func (o *CreatejiraIntegrationRequestParameters) GetInstanceUrl() string { + if o == nil { + var ret string + return ret + } + + return o.InstanceUrl +} + +// GetInstanceUrlOk returns a tuple with the InstanceUrl field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequestParameters) GetInstanceUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.InstanceUrl, true +} + +// SetInstanceUrl sets field value +func (o *CreatejiraIntegrationRequestParameters) SetInstanceUrl(v string) { + o.InstanceUrl = v +} + +// GetAuthMethod returns the AuthMethod field value +func (o *CreatejiraIntegrationRequestParameters) GetAuthMethod() ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD { + if o == nil { + var ret ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD + return ret + } + + return o.AuthMethod +} + +// GetAuthMethodOk returns a tuple with the AuthMethod field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequestParameters) GetAuthMethodOk() (*ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD, bool) { + if o == nil { + return nil, false + } + return &o.AuthMethod, true +} + +// SetAuthMethod sets field value +func (o *CreatejiraIntegrationRequestParameters) SetAuthMethod(v ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD) { + o.AuthMethod = v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *CreatejiraIntegrationRequestParameters) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequestParameters) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *CreatejiraIntegrationRequestParameters) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *CreatejiraIntegrationRequestParameters) SetEmail(v string) { + o.Email = &v +} + +// GetApiKey returns the ApiKey field value if set, zero value otherwise. +func (o *CreatejiraIntegrationRequestParameters) GetApiKey() string { + if o == nil || IsNil(o.ApiKey) { + var ret string + return ret + } + return *o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequestParameters) GetApiKeyOk() (*string, bool) { + if o == nil || IsNil(o.ApiKey) { + return nil, false + } + return o.ApiKey, true +} + +// HasApiKey returns a boolean if a field has been set. +func (o *CreatejiraIntegrationRequestParameters) HasApiKey() bool { + if o != nil && !IsNil(o.ApiKey) { + return true + } + + return false +} + +// SetApiKey gets a reference to the given string and assigns it to the ApiKey field. +func (o *CreatejiraIntegrationRequestParameters) SetApiKey(v string) { + o.ApiKey = &v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *CreatejiraIntegrationRequestParameters) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequestParameters) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *CreatejiraIntegrationRequestParameters) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *CreatejiraIntegrationRequestParameters) SetUsername(v string) { + o.Username = &v +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *CreatejiraIntegrationRequestParameters) GetPassword() string { + if o == nil || IsNil(o.Password) { + var ret string + return ret + } + return *o.Password +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequestParameters) GetPasswordOk() (*string, bool) { + if o == nil || IsNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *CreatejiraIntegrationRequestParameters) HasPassword() bool { + if o != nil && !IsNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *CreatejiraIntegrationRequestParameters) SetPassword(v string) { + o.Password = &v +} + +// GetProxyId returns the ProxyId field value if set, zero value otherwise. +func (o *CreatejiraIntegrationRequestParameters) GetProxyId() string { + if o == nil || IsNil(o.ProxyId) { + var ret string + return ret + } + return *o.ProxyId +} + +// GetProxyIdOk returns a tuple with the ProxyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequestParameters) GetProxyIdOk() (*string, bool) { + if o == nil || IsNil(o.ProxyId) { + return nil, false + } + return o.ProxyId, true +} + +// HasProxyId returns a boolean if a field has been set. +func (o *CreatejiraIntegrationRequestParameters) HasProxyId() bool { + if o != nil && !IsNil(o.ProxyId) { + return true + } + + return false +} + +// SetProxyId gets a reference to the given string and assigns it to the ProxyId field. +func (o *CreatejiraIntegrationRequestParameters) SetProxyId(v string) { + o.ProxyId = &v +} + +// GetTemplates returns the Templates field value if set, zero value otherwise. +func (o *CreatejiraIntegrationRequestParameters) GetTemplates() []CreatejiraIntegrationRequestParametersTemplatesInner { + if o == nil || IsNil(o.Templates) { + var ret []CreatejiraIntegrationRequestParametersTemplatesInner + return ret + } + return o.Templates +} + +// GetTemplatesOk returns a tuple with the Templates field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequestParameters) GetTemplatesOk() ([]CreatejiraIntegrationRequestParametersTemplatesInner, bool) { + if o == nil || IsNil(o.Templates) { + return nil, false + } + return o.Templates, true +} + +// HasTemplates returns a boolean if a field has been set. +func (o *CreatejiraIntegrationRequestParameters) HasTemplates() bool { + if o != nil && !IsNil(o.Templates) { + return true + } + + return false +} + +// SetTemplates gets a reference to the given []CreatejiraIntegrationRequestParametersTemplatesInner and assigns it to the Templates field. +func (o *CreatejiraIntegrationRequestParameters) SetTemplates(v []CreatejiraIntegrationRequestParametersTemplatesInner) { + o.Templates = v +} + +func (o CreatejiraIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatejiraIntegrationRequestParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["account_id"] = o.AccountId + toSerialize["instance_url"] = o.InstanceUrl + toSerialize["auth_method"] = o.AuthMethod + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !IsNil(o.ApiKey) { + toSerialize["api_key"] = o.ApiKey + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + if !IsNil(o.Password) { + toSerialize["password"] = o.Password + } + if !IsNil(o.ProxyId) { + toSerialize["proxy_id"] = o.ProxyId + } + if !IsNil(o.Templates) { + toSerialize["templates"] = o.Templates + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreatejiraIntegrationRequestParameters) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "account_id", + "instance_url", + "auth_method", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreatejiraIntegrationRequestParameters := _CreatejiraIntegrationRequestParameters{} + + err = json.Unmarshal(data, &varCreatejiraIntegrationRequestParameters) + + if err != nil { + return err + } + + *o = CreatejiraIntegrationRequestParameters(varCreatejiraIntegrationRequestParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "account_id") + delete(additionalProperties, "instance_url") + delete(additionalProperties, "auth_method") + delete(additionalProperties, "email") + delete(additionalProperties, "api_key") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "proxy_id") + delete(additionalProperties, "templates") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreatejiraIntegrationRequestParameters struct { + value *CreatejiraIntegrationRequestParameters + isSet bool +} + +func (v NullableCreatejiraIntegrationRequestParameters) Get() *CreatejiraIntegrationRequestParameters { + return v.value +} + +func (v *NullableCreatejiraIntegrationRequestParameters) Set(val *CreatejiraIntegrationRequestParameters) { + v.value = val + v.isSet = true +} + +func (v NullableCreatejiraIntegrationRequestParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatejiraIntegrationRequestParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatejiraIntegrationRequestParameters(val *CreatejiraIntegrationRequestParameters) *NullableCreatejiraIntegrationRequestParameters { + return &NullableCreatejiraIntegrationRequestParameters{value: val, isSet: true} +} + +func (v NullableCreatejiraIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatejiraIntegrationRequestParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createjira_integration_request_parameters_templates_inner.go b/pkg/api/v3/model_createjira_integration_request_parameters_templates_inner.go new file mode 100644 index 00000000..d83557db --- /dev/null +++ b/pkg/api/v3/model_createjira_integration_request_parameters_templates_inner.go @@ -0,0 +1,300 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreatejiraIntegrationRequestParametersTemplatesInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatejiraIntegrationRequestParametersTemplatesInner{} + +// CreatejiraIntegrationRequestParametersTemplatesInner struct for CreatejiraIntegrationRequestParametersTemplatesInner +type CreatejiraIntegrationRequestParametersTemplatesInner struct { + Name string `json:"name"` + ProjectId string `json:"project_id"` + IssueType string `json:"issue_type"` + PropertiesMapping []CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner `json:"properties_mapping,omitempty"` + ParentKey *string `json:"parent_key,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreatejiraIntegrationRequestParametersTemplatesInner CreatejiraIntegrationRequestParametersTemplatesInner + +// NewCreatejiraIntegrationRequestParametersTemplatesInner instantiates a new CreatejiraIntegrationRequestParametersTemplatesInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreatejiraIntegrationRequestParametersTemplatesInner(name string, projectId string, issueType string) *CreatejiraIntegrationRequestParametersTemplatesInner { + this := CreatejiraIntegrationRequestParametersTemplatesInner{} + this.Name = name + this.ProjectId = projectId + this.IssueType = issueType + return &this +} + +// NewCreatejiraIntegrationRequestParametersTemplatesInnerWithDefaults instantiates a new CreatejiraIntegrationRequestParametersTemplatesInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreatejiraIntegrationRequestParametersTemplatesInnerWithDefaults() *CreatejiraIntegrationRequestParametersTemplatesInner { + this := CreatejiraIntegrationRequestParametersTemplatesInner{} + return &this +} + +// GetName returns the Name field value +func (o *CreatejiraIntegrationRequestParametersTemplatesInner) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequestParametersTemplatesInner) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreatejiraIntegrationRequestParametersTemplatesInner) SetName(v string) { + o.Name = v +} + +// GetProjectId returns the ProjectId field value +func (o *CreatejiraIntegrationRequestParametersTemplatesInner) GetProjectId() string { + if o == nil { + var ret string + return ret + } + + return o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequestParametersTemplatesInner) GetProjectIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProjectId, true +} + +// SetProjectId sets field value +func (o *CreatejiraIntegrationRequestParametersTemplatesInner) SetProjectId(v string) { + o.ProjectId = v +} + +// GetIssueType returns the IssueType field value +func (o *CreatejiraIntegrationRequestParametersTemplatesInner) GetIssueType() string { + if o == nil { + var ret string + return ret + } + + return o.IssueType +} + +// GetIssueTypeOk returns a tuple with the IssueType field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequestParametersTemplatesInner) GetIssueTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.IssueType, true +} + +// SetIssueType sets field value +func (o *CreatejiraIntegrationRequestParametersTemplatesInner) SetIssueType(v string) { + o.IssueType = v +} + +// GetPropertiesMapping returns the PropertiesMapping field value if set, zero value otherwise. +func (o *CreatejiraIntegrationRequestParametersTemplatesInner) GetPropertiesMapping() []CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner { + if o == nil || IsNil(o.PropertiesMapping) { + var ret []CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner + return ret + } + return o.PropertiesMapping +} + +// GetPropertiesMappingOk returns a tuple with the PropertiesMapping field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequestParametersTemplatesInner) GetPropertiesMappingOk() ([]CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner, bool) { + if o == nil || IsNil(o.PropertiesMapping) { + return nil, false + } + return o.PropertiesMapping, true +} + +// HasPropertiesMapping returns a boolean if a field has been set. +func (o *CreatejiraIntegrationRequestParametersTemplatesInner) HasPropertiesMapping() bool { + if o != nil && !IsNil(o.PropertiesMapping) { + return true + } + + return false +} + +// SetPropertiesMapping gets a reference to the given []CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner and assigns it to the PropertiesMapping field. +func (o *CreatejiraIntegrationRequestParametersTemplatesInner) SetPropertiesMapping(v []CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner) { + o.PropertiesMapping = v +} + +// GetParentKey returns the ParentKey field value if set, zero value otherwise. +func (o *CreatejiraIntegrationRequestParametersTemplatesInner) GetParentKey() string { + if o == nil || IsNil(o.ParentKey) { + var ret string + return ret + } + return *o.ParentKey +} + +// GetParentKeyOk returns a tuple with the ParentKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequestParametersTemplatesInner) GetParentKeyOk() (*string, bool) { + if o == nil || IsNil(o.ParentKey) { + return nil, false + } + return o.ParentKey, true +} + +// HasParentKey returns a boolean if a field has been set. +func (o *CreatejiraIntegrationRequestParametersTemplatesInner) HasParentKey() bool { + if o != nil && !IsNil(o.ParentKey) { + return true + } + + return false +} + +// SetParentKey gets a reference to the given string and assigns it to the ParentKey field. +func (o *CreatejiraIntegrationRequestParametersTemplatesInner) SetParentKey(v string) { + o.ParentKey = &v +} + +func (o CreatejiraIntegrationRequestParametersTemplatesInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatejiraIntegrationRequestParametersTemplatesInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["project_id"] = o.ProjectId + toSerialize["issue_type"] = o.IssueType + if !IsNil(o.PropertiesMapping) { + toSerialize["properties_mapping"] = o.PropertiesMapping + } + if !IsNil(o.ParentKey) { + toSerialize["parent_key"] = o.ParentKey + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreatejiraIntegrationRequestParametersTemplatesInner) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "project_id", + "issue_type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreatejiraIntegrationRequestParametersTemplatesInner := _CreatejiraIntegrationRequestParametersTemplatesInner{} + + err = json.Unmarshal(data, &varCreatejiraIntegrationRequestParametersTemplatesInner) + + if err != nil { + return err + } + + *o = CreatejiraIntegrationRequestParametersTemplatesInner(varCreatejiraIntegrationRequestParametersTemplatesInner) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "project_id") + delete(additionalProperties, "issue_type") + delete(additionalProperties, "properties_mapping") + delete(additionalProperties, "parent_key") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreatejiraIntegrationRequestParametersTemplatesInner struct { + value *CreatejiraIntegrationRequestParametersTemplatesInner + isSet bool +} + +func (v NullableCreatejiraIntegrationRequestParametersTemplatesInner) Get() *CreatejiraIntegrationRequestParametersTemplatesInner { + return v.value +} + +func (v *NullableCreatejiraIntegrationRequestParametersTemplatesInner) Set(val *CreatejiraIntegrationRequestParametersTemplatesInner) { + v.value = val + v.isSet = true +} + +func (v NullableCreatejiraIntegrationRequestParametersTemplatesInner) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatejiraIntegrationRequestParametersTemplatesInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatejiraIntegrationRequestParametersTemplatesInner(val *CreatejiraIntegrationRequestParametersTemplatesInner) *NullableCreatejiraIntegrationRequestParametersTemplatesInner { + return &NullableCreatejiraIntegrationRequestParametersTemplatesInner{value: val, isSet: true} +} + +func (v NullableCreatejiraIntegrationRequestParametersTemplatesInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatejiraIntegrationRequestParametersTemplatesInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createjira_integration_request_parameters_templates_inner_properties_mapping_inner.go b/pkg/api/v3/model_createjira_integration_request_parameters_templates_inner_properties_mapping_inner.go new file mode 100644 index 00000000..22965855 --- /dev/null +++ b/pkg/api/v3/model_createjira_integration_request_parameters_templates_inner_properties_mapping_inner.go @@ -0,0 +1,197 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner{} + +// CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner struct for CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner +type CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner struct { + Name string `json:"name"` + Mapping []CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner `json:"mapping"` + AdditionalProperties map[string]interface{} +} + +type _CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner + +// NewCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner instantiates a new CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner(name string, mapping []CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner { + this := CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner{} + this.Name = name + this.Mapping = mapping + return &this +} + +// NewCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerWithDefaults instantiates a new CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerWithDefaults() *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner { + this := CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner{} + return &this +} + +// GetName returns the Name field value +func (o *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner) SetName(v string) { + o.Name = v +} + +// GetMapping returns the Mapping field value +func (o *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner) GetMapping() []CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner { + if o == nil { + var ret []CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner + return ret + } + + return o.Mapping +} + +// GetMappingOk returns a tuple with the Mapping field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner) GetMappingOk() ([]CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner, bool) { + if o == nil { + return nil, false + } + return o.Mapping, true +} + +// SetMapping sets field value +func (o *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner) SetMapping(v []CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) { + o.Mapping = v +} + +func (o CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["mapping"] = o.Mapping + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "mapping", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner := _CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner{} + + err = json.Unmarshal(data, &varCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner) + + if err != nil { + return err + } + + *o = CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner(varCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "mapping") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner struct { + value *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner + isSet bool +} + +func (v NullableCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner) Get() *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner { + return v.value +} + +func (v *NullableCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner) Set(val *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner) { + v.value = val + v.isSet = true +} + +func (v NullableCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner(val *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner) *NullableCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner { + return &NullableCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner{value: val, isSet: true} +} + +func (v NullableCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createjira_integration_request_parameters_templates_inner_properties_mapping_inner_mapping_inner.go b/pkg/api/v3/model_createjira_integration_request_parameters_templates_inner_properties_mapping_inner_mapping_inner.go new file mode 100644 index 00000000..1f14146f --- /dev/null +++ b/pkg/api/v3/model_createjira_integration_request_parameters_templates_inner_properties_mapping_inner_mapping_inner.go @@ -0,0 +1,271 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner{} + +// CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner struct for CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner +type CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner struct { + EscapeProperty ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY `json:"escape_property"` + JiraProperty string `json:"jira_property"` + EscapeOption *string `json:"escape_option,omitempty"` + JiraOption *string `json:"jira_option,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner + +// NewCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner instantiates a new CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner(escapeProperty ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY, jiraProperty string) *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner { + this := CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner{} + this.EscapeProperty = escapeProperty + this.JiraProperty = jiraProperty + return &this +} + +// NewCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInnerWithDefaults instantiates a new CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInnerWithDefaults() *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner { + this := CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner{} + return &this +} + +// GetEscapeProperty returns the EscapeProperty field value +func (o *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) GetEscapeProperty() ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY { + if o == nil { + var ret ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY + return ret + } + + return o.EscapeProperty +} + +// GetEscapePropertyOk returns a tuple with the EscapeProperty field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) GetEscapePropertyOk() (*ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY, bool) { + if o == nil { + return nil, false + } + return &o.EscapeProperty, true +} + +// SetEscapeProperty sets field value +func (o *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) SetEscapeProperty(v ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY) { + o.EscapeProperty = v +} + +// GetJiraProperty returns the JiraProperty field value +func (o *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) GetJiraProperty() string { + if o == nil { + var ret string + return ret + } + + return o.JiraProperty +} + +// GetJiraPropertyOk returns a tuple with the JiraProperty field value +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) GetJiraPropertyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.JiraProperty, true +} + +// SetJiraProperty sets field value +func (o *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) SetJiraProperty(v string) { + o.JiraProperty = v +} + +// GetEscapeOption returns the EscapeOption field value if set, zero value otherwise. +func (o *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) GetEscapeOption() string { + if o == nil || IsNil(o.EscapeOption) { + var ret string + return ret + } + return *o.EscapeOption +} + +// GetEscapeOptionOk returns a tuple with the EscapeOption field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) GetEscapeOptionOk() (*string, bool) { + if o == nil || IsNil(o.EscapeOption) { + return nil, false + } + return o.EscapeOption, true +} + +// HasEscapeOption returns a boolean if a field has been set. +func (o *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) HasEscapeOption() bool { + if o != nil && !IsNil(o.EscapeOption) { + return true + } + + return false +} + +// SetEscapeOption gets a reference to the given string and assigns it to the EscapeOption field. +func (o *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) SetEscapeOption(v string) { + o.EscapeOption = &v +} + +// GetJiraOption returns the JiraOption field value if set, zero value otherwise. +func (o *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) GetJiraOption() string { + if o == nil || IsNil(o.JiraOption) { + var ret string + return ret + } + return *o.JiraOption +} + +// GetJiraOptionOk returns a tuple with the JiraOption field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) GetJiraOptionOk() (*string, bool) { + if o == nil || IsNil(o.JiraOption) { + return nil, false + } + return o.JiraOption, true +} + +// HasJiraOption returns a boolean if a field has been set. +func (o *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) HasJiraOption() bool { + if o != nil && !IsNil(o.JiraOption) { + return true + } + + return false +} + +// SetJiraOption gets a reference to the given string and assigns it to the JiraOption field. +func (o *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) SetJiraOption(v string) { + o.JiraOption = &v +} + +func (o CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["escape_property"] = o.EscapeProperty + toSerialize["jira_property"] = o.JiraProperty + if !IsNil(o.EscapeOption) { + toSerialize["escape_option"] = o.EscapeOption + } + if !IsNil(o.JiraOption) { + toSerialize["jira_option"] = o.JiraOption + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "escape_property", + "jira_property", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner := _CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner{} + + err = json.Unmarshal(data, &varCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) + + if err != nil { + return err + } + + *o = CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner(varCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "escape_property") + delete(additionalProperties, "jira_property") + delete(additionalProperties, "escape_option") + delete(additionalProperties, "jira_option") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner struct { + value *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner + isSet bool +} + +func (v NullableCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) Get() *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner { + return v.value +} + +func (v *NullableCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) Set(val *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) { + v.value = val + v.isSet = true +} + +func (v NullableCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner(val *CreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) *NullableCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner { + return &NullableCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner{value: val, isSet: true} +} + +func (v NullableCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatejiraIntegrationRequestParametersTemplatesInnerPropertiesMappingInnerMappingInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createkubernetes_integration_200_response.go b/pkg/api/v3/model_createkubernetes_integration_200_response.go new file mode 100644 index 00000000..d317867d --- /dev/null +++ b/pkg/api/v3/model_createkubernetes_integration_200_response.go @@ -0,0 +1,551 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "time" + "fmt" +) + +// checks if the CreatekubernetesIntegration200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatekubernetesIntegration200Response{} + +// CreatekubernetesIntegration200Response struct for CreatekubernetesIntegration200Response +type CreatekubernetesIntegration200Response struct { + // The id of the integration + Id string `json:"id"` + // The name of the integration + Name string `json:"name"` + // The date and time the integration was created + CreatedAt time.Time `json:"createdAt"` + // The date and time the integration was last updated + UpdatedAt time.Time `json:"updatedAt"` + // The date and time the integration is scheduled for deletion + ScheduledForDeletionAt *time.Time `json:"scheduledForDeletionAt,omitempty"` + // The date and time the last pull workflow was executed + LastPullWorkflowAt *time.Time `json:"lastPullWorkflowAt,omitempty"` + Kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND `json:"kind"` + // Whether the integration is valid + Valid bool `json:"valid"` + // The validation errors of the integration + ValidationErrors []string `json:"validationErrors"` + // The id of the organization the integration belongs to + OrganizationId string `json:"organizationId"` + // The projects of the integration + Projects []ListProjects200ResponseDataInner `json:"projects"` + Parameters CreatekubernetesIntegrationRequestParameters `json:"parameters"` + Location *LocationDetailed1 `json:"location,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreatekubernetesIntegration200Response CreatekubernetesIntegration200Response + +// NewCreatekubernetesIntegration200Response instantiates a new CreatekubernetesIntegration200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreatekubernetesIntegration200Response(id string, name string, createdAt time.Time, updatedAt time.Time, kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND, valid bool, validationErrors []string, organizationId string, projects []ListProjects200ResponseDataInner, parameters CreatekubernetesIntegrationRequestParameters) *CreatekubernetesIntegration200Response { + this := CreatekubernetesIntegration200Response{} + this.Id = id + this.Name = name + this.CreatedAt = createdAt + this.UpdatedAt = updatedAt + this.Kind = kind + this.Valid = valid + this.ValidationErrors = validationErrors + this.OrganizationId = organizationId + this.Projects = projects + this.Parameters = parameters + return &this +} + +// NewCreatekubernetesIntegration200ResponseWithDefaults instantiates a new CreatekubernetesIntegration200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreatekubernetesIntegration200ResponseWithDefaults() *CreatekubernetesIntegration200Response { + this := CreatekubernetesIntegration200Response{} + return &this +} + +// GetId returns the Id field value +func (o *CreatekubernetesIntegration200Response) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegration200Response) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CreatekubernetesIntegration200Response) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *CreatekubernetesIntegration200Response) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegration200Response) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreatekubernetesIntegration200Response) SetName(v string) { + o.Name = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *CreatekubernetesIntegration200Response) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegration200Response) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *CreatekubernetesIntegration200Response) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *CreatekubernetesIntegration200Response) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegration200Response) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *CreatekubernetesIntegration200Response) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +// GetScheduledForDeletionAt returns the ScheduledForDeletionAt field value if set, zero value otherwise. +func (o *CreatekubernetesIntegration200Response) GetScheduledForDeletionAt() time.Time { + if o == nil || IsNil(o.ScheduledForDeletionAt) { + var ret time.Time + return ret + } + return *o.ScheduledForDeletionAt +} + +// GetScheduledForDeletionAtOk returns a tuple with the ScheduledForDeletionAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegration200Response) GetScheduledForDeletionAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.ScheduledForDeletionAt) { + return nil, false + } + return o.ScheduledForDeletionAt, true +} + +// HasScheduledForDeletionAt returns a boolean if a field has been set. +func (o *CreatekubernetesIntegration200Response) HasScheduledForDeletionAt() bool { + if o != nil && !IsNil(o.ScheduledForDeletionAt) { + return true + } + + return false +} + +// SetScheduledForDeletionAt gets a reference to the given time.Time and assigns it to the ScheduledForDeletionAt field. +func (o *CreatekubernetesIntegration200Response) SetScheduledForDeletionAt(v time.Time) { + o.ScheduledForDeletionAt = &v +} + +// GetLastPullWorkflowAt returns the LastPullWorkflowAt field value if set, zero value otherwise. +func (o *CreatekubernetesIntegration200Response) GetLastPullWorkflowAt() time.Time { + if o == nil || IsNil(o.LastPullWorkflowAt) { + var ret time.Time + return ret + } + return *o.LastPullWorkflowAt +} + +// GetLastPullWorkflowAtOk returns a tuple with the LastPullWorkflowAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegration200Response) GetLastPullWorkflowAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastPullWorkflowAt) { + return nil, false + } + return o.LastPullWorkflowAt, true +} + +// HasLastPullWorkflowAt returns a boolean if a field has been set. +func (o *CreatekubernetesIntegration200Response) HasLastPullWorkflowAt() bool { + if o != nil && !IsNil(o.LastPullWorkflowAt) { + return true + } + + return false +} + +// SetLastPullWorkflowAt gets a reference to the given time.Time and assigns it to the LastPullWorkflowAt field. +func (o *CreatekubernetesIntegration200Response) SetLastPullWorkflowAt(v time.Time) { + o.LastPullWorkflowAt = &v +} + +// GetKind returns the Kind field value +func (o *CreatekubernetesIntegration200Response) GetKind() ENUMPROPERTIESDATAITEMSPROPERTIESKIND { + if o == nil { + var ret ENUMPROPERTIESDATAITEMSPROPERTIESKIND + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegration200Response) GetKindOk() (*ENUMPROPERTIESDATAITEMSPROPERTIESKIND, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *CreatekubernetesIntegration200Response) SetKind(v ENUMPROPERTIESDATAITEMSPROPERTIESKIND) { + o.Kind = v +} + +// GetValid returns the Valid field value +func (o *CreatekubernetesIntegration200Response) GetValid() bool { + if o == nil { + var ret bool + return ret + } + + return o.Valid +} + +// GetValidOk returns a tuple with the Valid field value +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegration200Response) GetValidOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Valid, true +} + +// SetValid sets field value +func (o *CreatekubernetesIntegration200Response) SetValid(v bool) { + o.Valid = v +} + +// GetValidationErrors returns the ValidationErrors field value +func (o *CreatekubernetesIntegration200Response) GetValidationErrors() []string { + if o == nil { + var ret []string + return ret + } + + return o.ValidationErrors +} + +// GetValidationErrorsOk returns a tuple with the ValidationErrors field value +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegration200Response) GetValidationErrorsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ValidationErrors, true +} + +// SetValidationErrors sets field value +func (o *CreatekubernetesIntegration200Response) SetValidationErrors(v []string) { + o.ValidationErrors = v +} + +// GetOrganizationId returns the OrganizationId field value +func (o *CreatekubernetesIntegration200Response) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegration200Response) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *CreatekubernetesIntegration200Response) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetProjects returns the Projects field value +func (o *CreatekubernetesIntegration200Response) GetProjects() []ListProjects200ResponseDataInner { + if o == nil { + var ret []ListProjects200ResponseDataInner + return ret + } + + return o.Projects +} + +// GetProjectsOk returns a tuple with the Projects field value +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegration200Response) GetProjectsOk() ([]ListProjects200ResponseDataInner, bool) { + if o == nil { + return nil, false + } + return o.Projects, true +} + +// SetProjects sets field value +func (o *CreatekubernetesIntegration200Response) SetProjects(v []ListProjects200ResponseDataInner) { + o.Projects = v +} + +// GetParameters returns the Parameters field value +func (o *CreatekubernetesIntegration200Response) GetParameters() CreatekubernetesIntegrationRequestParameters { + if o == nil { + var ret CreatekubernetesIntegrationRequestParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegration200Response) GetParametersOk() (*CreatekubernetesIntegrationRequestParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreatekubernetesIntegration200Response) SetParameters(v CreatekubernetesIntegrationRequestParameters) { + o.Parameters = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *CreatekubernetesIntegration200Response) GetLocation() LocationDetailed1 { + if o == nil || IsNil(o.Location) { + var ret LocationDetailed1 + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegration200Response) GetLocationOk() (*LocationDetailed1, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *CreatekubernetesIntegration200Response) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given LocationDetailed1 and assigns it to the Location field. +func (o *CreatekubernetesIntegration200Response) SetLocation(v LocationDetailed1) { + o.Location = &v +} + +func (o CreatekubernetesIntegration200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatekubernetesIntegration200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["createdAt"] = o.CreatedAt + toSerialize["updatedAt"] = o.UpdatedAt + if !IsNil(o.ScheduledForDeletionAt) { + toSerialize["scheduledForDeletionAt"] = o.ScheduledForDeletionAt + } + if !IsNil(o.LastPullWorkflowAt) { + toSerialize["lastPullWorkflowAt"] = o.LastPullWorkflowAt + } + toSerialize["kind"] = o.Kind + toSerialize["valid"] = o.Valid + toSerialize["validationErrors"] = o.ValidationErrors + toSerialize["organizationId"] = o.OrganizationId + toSerialize["projects"] = o.Projects + toSerialize["parameters"] = o.Parameters + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreatekubernetesIntegration200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "createdAt", + "updatedAt", + "kind", + "valid", + "validationErrors", + "organizationId", + "projects", + "parameters", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreatekubernetesIntegration200Response := _CreatekubernetesIntegration200Response{} + + err = json.Unmarshal(data, &varCreatekubernetesIntegration200Response) + + if err != nil { + return err + } + + *o = CreatekubernetesIntegration200Response(varCreatekubernetesIntegration200Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "createdAt") + delete(additionalProperties, "updatedAt") + delete(additionalProperties, "scheduledForDeletionAt") + delete(additionalProperties, "lastPullWorkflowAt") + delete(additionalProperties, "kind") + delete(additionalProperties, "valid") + delete(additionalProperties, "validationErrors") + delete(additionalProperties, "organizationId") + delete(additionalProperties, "projects") + delete(additionalProperties, "parameters") + delete(additionalProperties, "location") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreatekubernetesIntegration200Response struct { + value *CreatekubernetesIntegration200Response + isSet bool +} + +func (v NullableCreatekubernetesIntegration200Response) Get() *CreatekubernetesIntegration200Response { + return v.value +} + +func (v *NullableCreatekubernetesIntegration200Response) Set(val *CreatekubernetesIntegration200Response) { + v.value = val + v.isSet = true +} + +func (v NullableCreatekubernetesIntegration200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatekubernetesIntegration200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatekubernetesIntegration200Response(val *CreatekubernetesIntegration200Response) *NullableCreatekubernetesIntegration200Response { + return &NullableCreatekubernetesIntegration200Response{value: val, isSet: true} +} + +func (v NullableCreatekubernetesIntegration200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatekubernetesIntegration200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createkubernetes_integration_request.go b/pkg/api/v3/model_createkubernetes_integration_request.go new file mode 100644 index 00000000..d213d912 --- /dev/null +++ b/pkg/api/v3/model_createkubernetes_integration_request.go @@ -0,0 +1,304 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreatekubernetesIntegrationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatekubernetesIntegrationRequest{} + +// CreatekubernetesIntegrationRequest struct for CreatekubernetesIntegrationRequest +type CreatekubernetesIntegrationRequest struct { + // The organization ID to create the integration for + OrganizationId string `json:"organizationId"` + // The name of the integration + Name string `json:"name"` + Parameters CreatekubernetesIntegrationRequestParameters `json:"parameters"` + // Optional proxy ID to create the integration for + ProxyId *string `json:"proxyId,omitempty"` + // Optional list of project IDs to create the integration for + ProjectIds []string `json:"projectIds,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreatekubernetesIntegrationRequest CreatekubernetesIntegrationRequest + +// NewCreatekubernetesIntegrationRequest instantiates a new CreatekubernetesIntegrationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreatekubernetesIntegrationRequest(organizationId string, name string, parameters CreatekubernetesIntegrationRequestParameters) *CreatekubernetesIntegrationRequest { + this := CreatekubernetesIntegrationRequest{} + this.OrganizationId = organizationId + this.Name = name + this.Parameters = parameters + return &this +} + +// NewCreatekubernetesIntegrationRequestWithDefaults instantiates a new CreatekubernetesIntegrationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreatekubernetesIntegrationRequestWithDefaults() *CreatekubernetesIntegrationRequest { + this := CreatekubernetesIntegrationRequest{} + return &this +} + +// GetOrganizationId returns the OrganizationId field value +func (o *CreatekubernetesIntegrationRequest) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegrationRequest) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *CreatekubernetesIntegrationRequest) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetName returns the Name field value +func (o *CreatekubernetesIntegrationRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegrationRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreatekubernetesIntegrationRequest) SetName(v string) { + o.Name = v +} + +// GetParameters returns the Parameters field value +func (o *CreatekubernetesIntegrationRequest) GetParameters() CreatekubernetesIntegrationRequestParameters { + if o == nil { + var ret CreatekubernetesIntegrationRequestParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegrationRequest) GetParametersOk() (*CreatekubernetesIntegrationRequestParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreatekubernetesIntegrationRequest) SetParameters(v CreatekubernetesIntegrationRequestParameters) { + o.Parameters = v +} + +// GetProxyId returns the ProxyId field value if set, zero value otherwise. +func (o *CreatekubernetesIntegrationRequest) GetProxyId() string { + if o == nil || IsNil(o.ProxyId) { + var ret string + return ret + } + return *o.ProxyId +} + +// GetProxyIdOk returns a tuple with the ProxyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegrationRequest) GetProxyIdOk() (*string, bool) { + if o == nil || IsNil(o.ProxyId) { + return nil, false + } + return o.ProxyId, true +} + +// HasProxyId returns a boolean if a field has been set. +func (o *CreatekubernetesIntegrationRequest) HasProxyId() bool { + if o != nil && !IsNil(o.ProxyId) { + return true + } + + return false +} + +// SetProxyId gets a reference to the given string and assigns it to the ProxyId field. +func (o *CreatekubernetesIntegrationRequest) SetProxyId(v string) { + o.ProxyId = &v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreatekubernetesIntegrationRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegrationRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreatekubernetesIntegrationRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreatekubernetesIntegrationRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o CreatekubernetesIntegrationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatekubernetesIntegrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["organizationId"] = o.OrganizationId + toSerialize["name"] = o.Name + toSerialize["parameters"] = o.Parameters + if !IsNil(o.ProxyId) { + toSerialize["proxyId"] = o.ProxyId + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreatekubernetesIntegrationRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "organizationId", + "name", + "parameters", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreatekubernetesIntegrationRequest := _CreatekubernetesIntegrationRequest{} + + err = json.Unmarshal(data, &varCreatekubernetesIntegrationRequest) + + if err != nil { + return err + } + + *o = CreatekubernetesIntegrationRequest(varCreatekubernetesIntegrationRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "organizationId") + delete(additionalProperties, "name") + delete(additionalProperties, "parameters") + delete(additionalProperties, "proxyId") + delete(additionalProperties, "projectIds") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreatekubernetesIntegrationRequest struct { + value *CreatekubernetesIntegrationRequest + isSet bool +} + +func (v NullableCreatekubernetesIntegrationRequest) Get() *CreatekubernetesIntegrationRequest { + return v.value +} + +func (v *NullableCreatekubernetesIntegrationRequest) Set(val *CreatekubernetesIntegrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreatekubernetesIntegrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatekubernetesIntegrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatekubernetesIntegrationRequest(val *CreatekubernetesIntegrationRequest) *NullableCreatekubernetesIntegrationRequest { + return &NullableCreatekubernetesIntegrationRequest{value: val, isSet: true} +} + +func (v NullableCreatekubernetesIntegrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatekubernetesIntegrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createkubernetes_integration_request_parameters.go b/pkg/api/v3/model_createkubernetes_integration_request_parameters.go new file mode 100644 index 00000000..635c16af --- /dev/null +++ b/pkg/api/v3/model_createkubernetes_integration_request_parameters.go @@ -0,0 +1,192 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" +) + +// checks if the CreatekubernetesIntegrationRequestParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatekubernetesIntegrationRequestParameters{} + +// CreatekubernetesIntegrationRequestParameters The parameters of the integration +type CreatekubernetesIntegrationRequestParameters struct { + Blacklist *CreatekubernetesIntegrationRequestParametersBlacklist `json:"blacklist,omitempty"` + Tags *CreatekubernetesIntegrationRequestParametersTags `json:"tags,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreatekubernetesIntegrationRequestParameters CreatekubernetesIntegrationRequestParameters + +// NewCreatekubernetesIntegrationRequestParameters instantiates a new CreatekubernetesIntegrationRequestParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreatekubernetesIntegrationRequestParameters() *CreatekubernetesIntegrationRequestParameters { + this := CreatekubernetesIntegrationRequestParameters{} + return &this +} + +// NewCreatekubernetesIntegrationRequestParametersWithDefaults instantiates a new CreatekubernetesIntegrationRequestParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreatekubernetesIntegrationRequestParametersWithDefaults() *CreatekubernetesIntegrationRequestParameters { + this := CreatekubernetesIntegrationRequestParameters{} + return &this +} + +// GetBlacklist returns the Blacklist field value if set, zero value otherwise. +func (o *CreatekubernetesIntegrationRequestParameters) GetBlacklist() CreatekubernetesIntegrationRequestParametersBlacklist { + if o == nil || IsNil(o.Blacklist) { + var ret CreatekubernetesIntegrationRequestParametersBlacklist + return ret + } + return *o.Blacklist +} + +// GetBlacklistOk returns a tuple with the Blacklist field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegrationRequestParameters) GetBlacklistOk() (*CreatekubernetesIntegrationRequestParametersBlacklist, bool) { + if o == nil || IsNil(o.Blacklist) { + return nil, false + } + return o.Blacklist, true +} + +// HasBlacklist returns a boolean if a field has been set. +func (o *CreatekubernetesIntegrationRequestParameters) HasBlacklist() bool { + if o != nil && !IsNil(o.Blacklist) { + return true + } + + return false +} + +// SetBlacklist gets a reference to the given CreatekubernetesIntegrationRequestParametersBlacklist and assigns it to the Blacklist field. +func (o *CreatekubernetesIntegrationRequestParameters) SetBlacklist(v CreatekubernetesIntegrationRequestParametersBlacklist) { + o.Blacklist = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *CreatekubernetesIntegrationRequestParameters) GetTags() CreatekubernetesIntegrationRequestParametersTags { + if o == nil || IsNil(o.Tags) { + var ret CreatekubernetesIntegrationRequestParametersTags + return ret + } + return *o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegrationRequestParameters) GetTagsOk() (*CreatekubernetesIntegrationRequestParametersTags, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *CreatekubernetesIntegrationRequestParameters) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given CreatekubernetesIntegrationRequestParametersTags and assigns it to the Tags field. +func (o *CreatekubernetesIntegrationRequestParameters) SetTags(v CreatekubernetesIntegrationRequestParametersTags) { + o.Tags = &v +} + +func (o CreatekubernetesIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatekubernetesIntegrationRequestParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Blacklist) { + toSerialize["blacklist"] = o.Blacklist + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreatekubernetesIntegrationRequestParameters) UnmarshalJSON(data []byte) (err error) { + varCreatekubernetesIntegrationRequestParameters := _CreatekubernetesIntegrationRequestParameters{} + + err = json.Unmarshal(data, &varCreatekubernetesIntegrationRequestParameters) + + if err != nil { + return err + } + + *o = CreatekubernetesIntegrationRequestParameters(varCreatekubernetesIntegrationRequestParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "blacklist") + delete(additionalProperties, "tags") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreatekubernetesIntegrationRequestParameters struct { + value *CreatekubernetesIntegrationRequestParameters + isSet bool +} + +func (v NullableCreatekubernetesIntegrationRequestParameters) Get() *CreatekubernetesIntegrationRequestParameters { + return v.value +} + +func (v *NullableCreatekubernetesIntegrationRequestParameters) Set(val *CreatekubernetesIntegrationRequestParameters) { + v.value = val + v.isSet = true +} + +func (v NullableCreatekubernetesIntegrationRequestParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatekubernetesIntegrationRequestParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatekubernetesIntegrationRequestParameters(val *CreatekubernetesIntegrationRequestParameters) *NullableCreatekubernetesIntegrationRequestParameters { + return &NullableCreatekubernetesIntegrationRequestParameters{value: val, isSet: true} +} + +func (v NullableCreatekubernetesIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatekubernetesIntegrationRequestParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createkubernetes_integration_request_parameters_blacklist.go b/pkg/api/v3/model_createkubernetes_integration_request_parameters_blacklist.go new file mode 100644 index 00000000..91d56214 --- /dev/null +++ b/pkg/api/v3/model_createkubernetes_integration_request_parameters_blacklist.go @@ -0,0 +1,155 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" +) + +// checks if the CreatekubernetesIntegrationRequestParametersBlacklist type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatekubernetesIntegrationRequestParametersBlacklist{} + +// CreatekubernetesIntegrationRequestParametersBlacklist struct for CreatekubernetesIntegrationRequestParametersBlacklist +type CreatekubernetesIntegrationRequestParametersBlacklist struct { + Namespaces []string `json:"namespaces,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreatekubernetesIntegrationRequestParametersBlacklist CreatekubernetesIntegrationRequestParametersBlacklist + +// NewCreatekubernetesIntegrationRequestParametersBlacklist instantiates a new CreatekubernetesIntegrationRequestParametersBlacklist object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreatekubernetesIntegrationRequestParametersBlacklist() *CreatekubernetesIntegrationRequestParametersBlacklist { + this := CreatekubernetesIntegrationRequestParametersBlacklist{} + return &this +} + +// NewCreatekubernetesIntegrationRequestParametersBlacklistWithDefaults instantiates a new CreatekubernetesIntegrationRequestParametersBlacklist object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreatekubernetesIntegrationRequestParametersBlacklistWithDefaults() *CreatekubernetesIntegrationRequestParametersBlacklist { + this := CreatekubernetesIntegrationRequestParametersBlacklist{} + return &this +} + +// GetNamespaces returns the Namespaces field value if set, zero value otherwise. +func (o *CreatekubernetesIntegrationRequestParametersBlacklist) GetNamespaces() []string { + if o == nil || IsNil(o.Namespaces) { + var ret []string + return ret + } + return o.Namespaces +} + +// GetNamespacesOk returns a tuple with the Namespaces field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegrationRequestParametersBlacklist) GetNamespacesOk() ([]string, bool) { + if o == nil || IsNil(o.Namespaces) { + return nil, false + } + return o.Namespaces, true +} + +// HasNamespaces returns a boolean if a field has been set. +func (o *CreatekubernetesIntegrationRequestParametersBlacklist) HasNamespaces() bool { + if o != nil && !IsNil(o.Namespaces) { + return true + } + + return false +} + +// SetNamespaces gets a reference to the given []string and assigns it to the Namespaces field. +func (o *CreatekubernetesIntegrationRequestParametersBlacklist) SetNamespaces(v []string) { + o.Namespaces = v +} + +func (o CreatekubernetesIntegrationRequestParametersBlacklist) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatekubernetesIntegrationRequestParametersBlacklist) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Namespaces) { + toSerialize["namespaces"] = o.Namespaces + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreatekubernetesIntegrationRequestParametersBlacklist) UnmarshalJSON(data []byte) (err error) { + varCreatekubernetesIntegrationRequestParametersBlacklist := _CreatekubernetesIntegrationRequestParametersBlacklist{} + + err = json.Unmarshal(data, &varCreatekubernetesIntegrationRequestParametersBlacklist) + + if err != nil { + return err + } + + *o = CreatekubernetesIntegrationRequestParametersBlacklist(varCreatekubernetesIntegrationRequestParametersBlacklist) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "namespaces") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreatekubernetesIntegrationRequestParametersBlacklist struct { + value *CreatekubernetesIntegrationRequestParametersBlacklist + isSet bool +} + +func (v NullableCreatekubernetesIntegrationRequestParametersBlacklist) Get() *CreatekubernetesIntegrationRequestParametersBlacklist { + return v.value +} + +func (v *NullableCreatekubernetesIntegrationRequestParametersBlacklist) Set(val *CreatekubernetesIntegrationRequestParametersBlacklist) { + v.value = val + v.isSet = true +} + +func (v NullableCreatekubernetesIntegrationRequestParametersBlacklist) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatekubernetesIntegrationRequestParametersBlacklist) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatekubernetesIntegrationRequestParametersBlacklist(val *CreatekubernetesIntegrationRequestParametersBlacklist) *NullableCreatekubernetesIntegrationRequestParametersBlacklist { + return &NullableCreatekubernetesIntegrationRequestParametersBlacklist{value: val, isSet: true} +} + +func (v NullableCreatekubernetesIntegrationRequestParametersBlacklist) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatekubernetesIntegrationRequestParametersBlacklist) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createkubernetes_integration_request_parameters_tags.go b/pkg/api/v3/model_createkubernetes_integration_request_parameters_tags.go new file mode 100644 index 00000000..efa8afda --- /dev/null +++ b/pkg/api/v3/model_createkubernetes_integration_request_parameters_tags.go @@ -0,0 +1,192 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" +) + +// checks if the CreatekubernetesIntegrationRequestParametersTags type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatekubernetesIntegrationRequestParametersTags{} + +// CreatekubernetesIntegrationRequestParametersTags struct for CreatekubernetesIntegrationRequestParametersTags +type CreatekubernetesIntegrationRequestParametersTags struct { + Labels []string `json:"labels,omitempty"` + Namespaces *bool `json:"namespaces,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreatekubernetesIntegrationRequestParametersTags CreatekubernetesIntegrationRequestParametersTags + +// NewCreatekubernetesIntegrationRequestParametersTags instantiates a new CreatekubernetesIntegrationRequestParametersTags object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreatekubernetesIntegrationRequestParametersTags() *CreatekubernetesIntegrationRequestParametersTags { + this := CreatekubernetesIntegrationRequestParametersTags{} + return &this +} + +// NewCreatekubernetesIntegrationRequestParametersTagsWithDefaults instantiates a new CreatekubernetesIntegrationRequestParametersTags object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreatekubernetesIntegrationRequestParametersTagsWithDefaults() *CreatekubernetesIntegrationRequestParametersTags { + this := CreatekubernetesIntegrationRequestParametersTags{} + return &this +} + +// GetLabels returns the Labels field value if set, zero value otherwise. +func (o *CreatekubernetesIntegrationRequestParametersTags) GetLabels() []string { + if o == nil || IsNil(o.Labels) { + var ret []string + return ret + } + return o.Labels +} + +// GetLabelsOk returns a tuple with the Labels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegrationRequestParametersTags) GetLabelsOk() ([]string, bool) { + if o == nil || IsNil(o.Labels) { + return nil, false + } + return o.Labels, true +} + +// HasLabels returns a boolean if a field has been set. +func (o *CreatekubernetesIntegrationRequestParametersTags) HasLabels() bool { + if o != nil && !IsNil(o.Labels) { + return true + } + + return false +} + +// SetLabels gets a reference to the given []string and assigns it to the Labels field. +func (o *CreatekubernetesIntegrationRequestParametersTags) SetLabels(v []string) { + o.Labels = v +} + +// GetNamespaces returns the Namespaces field value if set, zero value otherwise. +func (o *CreatekubernetesIntegrationRequestParametersTags) GetNamespaces() bool { + if o == nil || IsNil(o.Namespaces) { + var ret bool + return ret + } + return *o.Namespaces +} + +// GetNamespacesOk returns a tuple with the Namespaces field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatekubernetesIntegrationRequestParametersTags) GetNamespacesOk() (*bool, bool) { + if o == nil || IsNil(o.Namespaces) { + return nil, false + } + return o.Namespaces, true +} + +// HasNamespaces returns a boolean if a field has been set. +func (o *CreatekubernetesIntegrationRequestParametersTags) HasNamespaces() bool { + if o != nil && !IsNil(o.Namespaces) { + return true + } + + return false +} + +// SetNamespaces gets a reference to the given bool and assigns it to the Namespaces field. +func (o *CreatekubernetesIntegrationRequestParametersTags) SetNamespaces(v bool) { + o.Namespaces = &v +} + +func (o CreatekubernetesIntegrationRequestParametersTags) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatekubernetesIntegrationRequestParametersTags) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Labels) { + toSerialize["labels"] = o.Labels + } + if !IsNil(o.Namespaces) { + toSerialize["namespaces"] = o.Namespaces + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreatekubernetesIntegrationRequestParametersTags) UnmarshalJSON(data []byte) (err error) { + varCreatekubernetesIntegrationRequestParametersTags := _CreatekubernetesIntegrationRequestParametersTags{} + + err = json.Unmarshal(data, &varCreatekubernetesIntegrationRequestParametersTags) + + if err != nil { + return err + } + + *o = CreatekubernetesIntegrationRequestParametersTags(varCreatekubernetesIntegrationRequestParametersTags) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "labels") + delete(additionalProperties, "namespaces") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreatekubernetesIntegrationRequestParametersTags struct { + value *CreatekubernetesIntegrationRequestParametersTags + isSet bool +} + +func (v NullableCreatekubernetesIntegrationRequestParametersTags) Get() *CreatekubernetesIntegrationRequestParametersTags { + return v.value +} + +func (v *NullableCreatekubernetesIntegrationRequestParametersTags) Set(val *CreatekubernetesIntegrationRequestParametersTags) { + v.value = val + v.isSet = true +} + +func (v NullableCreatekubernetesIntegrationRequestParametersTags) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatekubernetesIntegrationRequestParametersTags) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatekubernetesIntegrationRequestParametersTags(val *CreatekubernetesIntegrationRequestParametersTags) *NullableCreatekubernetesIntegrationRequestParametersTags { + return &NullableCreatekubernetesIntegrationRequestParametersTags{value: val, isSet: true} +} + +func (v NullableCreatekubernetesIntegrationRequestParametersTags) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatekubernetesIntegrationRequestParametersTags) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createwiz_integration_200_response.go b/pkg/api/v3/model_createwiz_integration_200_response.go new file mode 100644 index 00000000..9d326018 --- /dev/null +++ b/pkg/api/v3/model_createwiz_integration_200_response.go @@ -0,0 +1,551 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "time" + "fmt" +) + +// checks if the CreatewizIntegration200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatewizIntegration200Response{} + +// CreatewizIntegration200Response struct for CreatewizIntegration200Response +type CreatewizIntegration200Response struct { + // The id of the integration + Id string `json:"id"` + // The name of the integration + Name string `json:"name"` + // The date and time the integration was created + CreatedAt time.Time `json:"createdAt"` + // The date and time the integration was last updated + UpdatedAt time.Time `json:"updatedAt"` + // The date and time the integration is scheduled for deletion + ScheduledForDeletionAt *time.Time `json:"scheduledForDeletionAt,omitempty"` + // The date and time the last pull workflow was executed + LastPullWorkflowAt *time.Time `json:"lastPullWorkflowAt,omitempty"` + Kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND `json:"kind"` + // Whether the integration is valid + Valid bool `json:"valid"` + // The validation errors of the integration + ValidationErrors []string `json:"validationErrors"` + // The id of the organization the integration belongs to + OrganizationId string `json:"organizationId"` + // The projects of the integration + Projects []ListProjects200ResponseDataInner `json:"projects"` + Parameters CreatewizIntegrationRequestParameters `json:"parameters"` + Location *LocationDetailed1 `json:"location,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreatewizIntegration200Response CreatewizIntegration200Response + +// NewCreatewizIntegration200Response instantiates a new CreatewizIntegration200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreatewizIntegration200Response(id string, name string, createdAt time.Time, updatedAt time.Time, kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND, valid bool, validationErrors []string, organizationId string, projects []ListProjects200ResponseDataInner, parameters CreatewizIntegrationRequestParameters) *CreatewizIntegration200Response { + this := CreatewizIntegration200Response{} + this.Id = id + this.Name = name + this.CreatedAt = createdAt + this.UpdatedAt = updatedAt + this.Kind = kind + this.Valid = valid + this.ValidationErrors = validationErrors + this.OrganizationId = organizationId + this.Projects = projects + this.Parameters = parameters + return &this +} + +// NewCreatewizIntegration200ResponseWithDefaults instantiates a new CreatewizIntegration200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreatewizIntegration200ResponseWithDefaults() *CreatewizIntegration200Response { + this := CreatewizIntegration200Response{} + return &this +} + +// GetId returns the Id field value +func (o *CreatewizIntegration200Response) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *CreatewizIntegration200Response) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *CreatewizIntegration200Response) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *CreatewizIntegration200Response) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreatewizIntegration200Response) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreatewizIntegration200Response) SetName(v string) { + o.Name = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *CreatewizIntegration200Response) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *CreatewizIntegration200Response) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *CreatewizIntegration200Response) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *CreatewizIntegration200Response) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *CreatewizIntegration200Response) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *CreatewizIntegration200Response) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +// GetScheduledForDeletionAt returns the ScheduledForDeletionAt field value if set, zero value otherwise. +func (o *CreatewizIntegration200Response) GetScheduledForDeletionAt() time.Time { + if o == nil || IsNil(o.ScheduledForDeletionAt) { + var ret time.Time + return ret + } + return *o.ScheduledForDeletionAt +} + +// GetScheduledForDeletionAtOk returns a tuple with the ScheduledForDeletionAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatewizIntegration200Response) GetScheduledForDeletionAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.ScheduledForDeletionAt) { + return nil, false + } + return o.ScheduledForDeletionAt, true +} + +// HasScheduledForDeletionAt returns a boolean if a field has been set. +func (o *CreatewizIntegration200Response) HasScheduledForDeletionAt() bool { + if o != nil && !IsNil(o.ScheduledForDeletionAt) { + return true + } + + return false +} + +// SetScheduledForDeletionAt gets a reference to the given time.Time and assigns it to the ScheduledForDeletionAt field. +func (o *CreatewizIntegration200Response) SetScheduledForDeletionAt(v time.Time) { + o.ScheduledForDeletionAt = &v +} + +// GetLastPullWorkflowAt returns the LastPullWorkflowAt field value if set, zero value otherwise. +func (o *CreatewizIntegration200Response) GetLastPullWorkflowAt() time.Time { + if o == nil || IsNil(o.LastPullWorkflowAt) { + var ret time.Time + return ret + } + return *o.LastPullWorkflowAt +} + +// GetLastPullWorkflowAtOk returns a tuple with the LastPullWorkflowAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatewizIntegration200Response) GetLastPullWorkflowAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastPullWorkflowAt) { + return nil, false + } + return o.LastPullWorkflowAt, true +} + +// HasLastPullWorkflowAt returns a boolean if a field has been set. +func (o *CreatewizIntegration200Response) HasLastPullWorkflowAt() bool { + if o != nil && !IsNil(o.LastPullWorkflowAt) { + return true + } + + return false +} + +// SetLastPullWorkflowAt gets a reference to the given time.Time and assigns it to the LastPullWorkflowAt field. +func (o *CreatewizIntegration200Response) SetLastPullWorkflowAt(v time.Time) { + o.LastPullWorkflowAt = &v +} + +// GetKind returns the Kind field value +func (o *CreatewizIntegration200Response) GetKind() ENUMPROPERTIESDATAITEMSPROPERTIESKIND { + if o == nil { + var ret ENUMPROPERTIESDATAITEMSPROPERTIESKIND + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *CreatewizIntegration200Response) GetKindOk() (*ENUMPROPERTIESDATAITEMSPROPERTIESKIND, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *CreatewizIntegration200Response) SetKind(v ENUMPROPERTIESDATAITEMSPROPERTIESKIND) { + o.Kind = v +} + +// GetValid returns the Valid field value +func (o *CreatewizIntegration200Response) GetValid() bool { + if o == nil { + var ret bool + return ret + } + + return o.Valid +} + +// GetValidOk returns a tuple with the Valid field value +// and a boolean to check if the value has been set. +func (o *CreatewizIntegration200Response) GetValidOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Valid, true +} + +// SetValid sets field value +func (o *CreatewizIntegration200Response) SetValid(v bool) { + o.Valid = v +} + +// GetValidationErrors returns the ValidationErrors field value +func (o *CreatewizIntegration200Response) GetValidationErrors() []string { + if o == nil { + var ret []string + return ret + } + + return o.ValidationErrors +} + +// GetValidationErrorsOk returns a tuple with the ValidationErrors field value +// and a boolean to check if the value has been set. +func (o *CreatewizIntegration200Response) GetValidationErrorsOk() ([]string, bool) { + if o == nil { + return nil, false + } + return o.ValidationErrors, true +} + +// SetValidationErrors sets field value +func (o *CreatewizIntegration200Response) SetValidationErrors(v []string) { + o.ValidationErrors = v +} + +// GetOrganizationId returns the OrganizationId field value +func (o *CreatewizIntegration200Response) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *CreatewizIntegration200Response) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *CreatewizIntegration200Response) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetProjects returns the Projects field value +func (o *CreatewizIntegration200Response) GetProjects() []ListProjects200ResponseDataInner { + if o == nil { + var ret []ListProjects200ResponseDataInner + return ret + } + + return o.Projects +} + +// GetProjectsOk returns a tuple with the Projects field value +// and a boolean to check if the value has been set. +func (o *CreatewizIntegration200Response) GetProjectsOk() ([]ListProjects200ResponseDataInner, bool) { + if o == nil { + return nil, false + } + return o.Projects, true +} + +// SetProjects sets field value +func (o *CreatewizIntegration200Response) SetProjects(v []ListProjects200ResponseDataInner) { + o.Projects = v +} + +// GetParameters returns the Parameters field value +func (o *CreatewizIntegration200Response) GetParameters() CreatewizIntegrationRequestParameters { + if o == nil { + var ret CreatewizIntegrationRequestParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreatewizIntegration200Response) GetParametersOk() (*CreatewizIntegrationRequestParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreatewizIntegration200Response) SetParameters(v CreatewizIntegrationRequestParameters) { + o.Parameters = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *CreatewizIntegration200Response) GetLocation() LocationDetailed1 { + if o == nil || IsNil(o.Location) { + var ret LocationDetailed1 + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatewizIntegration200Response) GetLocationOk() (*LocationDetailed1, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *CreatewizIntegration200Response) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given LocationDetailed1 and assigns it to the Location field. +func (o *CreatewizIntegration200Response) SetLocation(v LocationDetailed1) { + o.Location = &v +} + +func (o CreatewizIntegration200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatewizIntegration200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["createdAt"] = o.CreatedAt + toSerialize["updatedAt"] = o.UpdatedAt + if !IsNil(o.ScheduledForDeletionAt) { + toSerialize["scheduledForDeletionAt"] = o.ScheduledForDeletionAt + } + if !IsNil(o.LastPullWorkflowAt) { + toSerialize["lastPullWorkflowAt"] = o.LastPullWorkflowAt + } + toSerialize["kind"] = o.Kind + toSerialize["valid"] = o.Valid + toSerialize["validationErrors"] = o.ValidationErrors + toSerialize["organizationId"] = o.OrganizationId + toSerialize["projects"] = o.Projects + toSerialize["parameters"] = o.Parameters + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreatewizIntegration200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "createdAt", + "updatedAt", + "kind", + "valid", + "validationErrors", + "organizationId", + "projects", + "parameters", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreatewizIntegration200Response := _CreatewizIntegration200Response{} + + err = json.Unmarshal(data, &varCreatewizIntegration200Response) + + if err != nil { + return err + } + + *o = CreatewizIntegration200Response(varCreatewizIntegration200Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "createdAt") + delete(additionalProperties, "updatedAt") + delete(additionalProperties, "scheduledForDeletionAt") + delete(additionalProperties, "lastPullWorkflowAt") + delete(additionalProperties, "kind") + delete(additionalProperties, "valid") + delete(additionalProperties, "validationErrors") + delete(additionalProperties, "organizationId") + delete(additionalProperties, "projects") + delete(additionalProperties, "parameters") + delete(additionalProperties, "location") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreatewizIntegration200Response struct { + value *CreatewizIntegration200Response + isSet bool +} + +func (v NullableCreatewizIntegration200Response) Get() *CreatewizIntegration200Response { + return v.value +} + +func (v *NullableCreatewizIntegration200Response) Set(val *CreatewizIntegration200Response) { + v.value = val + v.isSet = true +} + +func (v NullableCreatewizIntegration200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatewizIntegration200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatewizIntegration200Response(val *CreatewizIntegration200Response) *NullableCreatewizIntegration200Response { + return &NullableCreatewizIntegration200Response{value: val, isSet: true} +} + +func (v NullableCreatewizIntegration200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatewizIntegration200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createwiz_integration_request.go b/pkg/api/v3/model_createwiz_integration_request.go new file mode 100644 index 00000000..48d6483d --- /dev/null +++ b/pkg/api/v3/model_createwiz_integration_request.go @@ -0,0 +1,304 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreatewizIntegrationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatewizIntegrationRequest{} + +// CreatewizIntegrationRequest struct for CreatewizIntegrationRequest +type CreatewizIntegrationRequest struct { + // The organization ID to create the integration for + OrganizationId string `json:"organizationId"` + // The name of the integration + Name string `json:"name"` + Parameters CreatewizIntegrationRequestParameters `json:"parameters"` + // Optional proxy ID to create the integration for + ProxyId *string `json:"proxyId,omitempty"` + // Optional list of project IDs to create the integration for + ProjectIds []string `json:"projectIds,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreatewizIntegrationRequest CreatewizIntegrationRequest + +// NewCreatewizIntegrationRequest instantiates a new CreatewizIntegrationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreatewizIntegrationRequest(organizationId string, name string, parameters CreatewizIntegrationRequestParameters) *CreatewizIntegrationRequest { + this := CreatewizIntegrationRequest{} + this.OrganizationId = organizationId + this.Name = name + this.Parameters = parameters + return &this +} + +// NewCreatewizIntegrationRequestWithDefaults instantiates a new CreatewizIntegrationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreatewizIntegrationRequestWithDefaults() *CreatewizIntegrationRequest { + this := CreatewizIntegrationRequest{} + return &this +} + +// GetOrganizationId returns the OrganizationId field value +func (o *CreatewizIntegrationRequest) GetOrganizationId() string { + if o == nil { + var ret string + return ret + } + + return o.OrganizationId +} + +// GetOrganizationIdOk returns a tuple with the OrganizationId field value +// and a boolean to check if the value has been set. +func (o *CreatewizIntegrationRequest) GetOrganizationIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.OrganizationId, true +} + +// SetOrganizationId sets field value +func (o *CreatewizIntegrationRequest) SetOrganizationId(v string) { + o.OrganizationId = v +} + +// GetName returns the Name field value +func (o *CreatewizIntegrationRequest) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *CreatewizIntegrationRequest) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *CreatewizIntegrationRequest) SetName(v string) { + o.Name = v +} + +// GetParameters returns the Parameters field value +func (o *CreatewizIntegrationRequest) GetParameters() CreatewizIntegrationRequestParameters { + if o == nil { + var ret CreatewizIntegrationRequestParameters + return ret + } + + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value +// and a boolean to check if the value has been set. +func (o *CreatewizIntegrationRequest) GetParametersOk() (*CreatewizIntegrationRequestParameters, bool) { + if o == nil { + return nil, false + } + return &o.Parameters, true +} + +// SetParameters sets field value +func (o *CreatewizIntegrationRequest) SetParameters(v CreatewizIntegrationRequestParameters) { + o.Parameters = v +} + +// GetProxyId returns the ProxyId field value if set, zero value otherwise. +func (o *CreatewizIntegrationRequest) GetProxyId() string { + if o == nil || IsNil(o.ProxyId) { + var ret string + return ret + } + return *o.ProxyId +} + +// GetProxyIdOk returns a tuple with the ProxyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatewizIntegrationRequest) GetProxyIdOk() (*string, bool) { + if o == nil || IsNil(o.ProxyId) { + return nil, false + } + return o.ProxyId, true +} + +// HasProxyId returns a boolean if a field has been set. +func (o *CreatewizIntegrationRequest) HasProxyId() bool { + if o != nil && !IsNil(o.ProxyId) { + return true + } + + return false +} + +// SetProxyId gets a reference to the given string and assigns it to the ProxyId field. +func (o *CreatewizIntegrationRequest) SetProxyId(v string) { + o.ProxyId = &v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *CreatewizIntegrationRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatewizIntegrationRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *CreatewizIntegrationRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *CreatewizIntegrationRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o CreatewizIntegrationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatewizIntegrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["organizationId"] = o.OrganizationId + toSerialize["name"] = o.Name + toSerialize["parameters"] = o.Parameters + if !IsNil(o.ProxyId) { + toSerialize["proxyId"] = o.ProxyId + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreatewizIntegrationRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "organizationId", + "name", + "parameters", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreatewizIntegrationRequest := _CreatewizIntegrationRequest{} + + err = json.Unmarshal(data, &varCreatewizIntegrationRequest) + + if err != nil { + return err + } + + *o = CreatewizIntegrationRequest(varCreatewizIntegrationRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "organizationId") + delete(additionalProperties, "name") + delete(additionalProperties, "parameters") + delete(additionalProperties, "proxyId") + delete(additionalProperties, "projectIds") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreatewizIntegrationRequest struct { + value *CreatewizIntegrationRequest + isSet bool +} + +func (v NullableCreatewizIntegrationRequest) Get() *CreatewizIntegrationRequest { + return v.value +} + +func (v *NullableCreatewizIntegrationRequest) Set(val *CreatewizIntegrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableCreatewizIntegrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatewizIntegrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatewizIntegrationRequest(val *CreatewizIntegrationRequest) *NullableCreatewizIntegrationRequest { + return &NullableCreatewizIntegrationRequest{value: val, isSet: true} +} + +func (v NullableCreatewizIntegrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatewizIntegrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_createwiz_integration_request_parameters.go b/pkg/api/v3/model_createwiz_integration_request_parameters.go new file mode 100644 index 00000000..a7d77634 --- /dev/null +++ b/pkg/api/v3/model_createwiz_integration_request_parameters.go @@ -0,0 +1,292 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the CreatewizIntegrationRequestParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &CreatewizIntegrationRequestParameters{} + +// CreatewizIntegrationRequestParameters The parameters of the integration +type CreatewizIntegrationRequestParameters struct { + ClientId string `json:"client_id"` + ClientSecret string `json:"client_secret"` + TokenUri string `json:"token_uri"` + ApiEndpoint string `json:"api_endpoint"` + UploadSeverityLevels []ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS `json:"upload_severity_levels,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _CreatewizIntegrationRequestParameters CreatewizIntegrationRequestParameters + +// NewCreatewizIntegrationRequestParameters instantiates a new CreatewizIntegrationRequestParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewCreatewizIntegrationRequestParameters(clientId string, clientSecret string, tokenUri string, apiEndpoint string) *CreatewizIntegrationRequestParameters { + this := CreatewizIntegrationRequestParameters{} + this.ClientId = clientId + this.ClientSecret = clientSecret + this.TokenUri = tokenUri + this.ApiEndpoint = apiEndpoint + return &this +} + +// NewCreatewizIntegrationRequestParametersWithDefaults instantiates a new CreatewizIntegrationRequestParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewCreatewizIntegrationRequestParametersWithDefaults() *CreatewizIntegrationRequestParameters { + this := CreatewizIntegrationRequestParameters{} + return &this +} + +// GetClientId returns the ClientId field value +func (o *CreatewizIntegrationRequestParameters) GetClientId() string { + if o == nil { + var ret string + return ret + } + + return o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value +// and a boolean to check if the value has been set. +func (o *CreatewizIntegrationRequestParameters) GetClientIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientId, true +} + +// SetClientId sets field value +func (o *CreatewizIntegrationRequestParameters) SetClientId(v string) { + o.ClientId = v +} + +// GetClientSecret returns the ClientSecret field value +func (o *CreatewizIntegrationRequestParameters) GetClientSecret() string { + if o == nil { + var ret string + return ret + } + + return o.ClientSecret +} + +// GetClientSecretOk returns a tuple with the ClientSecret field value +// and a boolean to check if the value has been set. +func (o *CreatewizIntegrationRequestParameters) GetClientSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientSecret, true +} + +// SetClientSecret sets field value +func (o *CreatewizIntegrationRequestParameters) SetClientSecret(v string) { + o.ClientSecret = v +} + +// GetTokenUri returns the TokenUri field value +func (o *CreatewizIntegrationRequestParameters) GetTokenUri() string { + if o == nil { + var ret string + return ret + } + + return o.TokenUri +} + +// GetTokenUriOk returns a tuple with the TokenUri field value +// and a boolean to check if the value has been set. +func (o *CreatewizIntegrationRequestParameters) GetTokenUriOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TokenUri, true +} + +// SetTokenUri sets field value +func (o *CreatewizIntegrationRequestParameters) SetTokenUri(v string) { + o.TokenUri = v +} + +// GetApiEndpoint returns the ApiEndpoint field value +func (o *CreatewizIntegrationRequestParameters) GetApiEndpoint() string { + if o == nil { + var ret string + return ret + } + + return o.ApiEndpoint +} + +// GetApiEndpointOk returns a tuple with the ApiEndpoint field value +// and a boolean to check if the value has been set. +func (o *CreatewizIntegrationRequestParameters) GetApiEndpointOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiEndpoint, true +} + +// SetApiEndpoint sets field value +func (o *CreatewizIntegrationRequestParameters) SetApiEndpoint(v string) { + o.ApiEndpoint = v +} + +// GetUploadSeverityLevels returns the UploadSeverityLevels field value if set, zero value otherwise. +func (o *CreatewizIntegrationRequestParameters) GetUploadSeverityLevels() []ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS { + if o == nil || IsNil(o.UploadSeverityLevels) { + var ret []ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS + return ret + } + return o.UploadSeverityLevels +} + +// GetUploadSeverityLevelsOk returns a tuple with the UploadSeverityLevels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *CreatewizIntegrationRequestParameters) GetUploadSeverityLevelsOk() ([]ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS, bool) { + if o == nil || IsNil(o.UploadSeverityLevels) { + return nil, false + } + return o.UploadSeverityLevels, true +} + +// HasUploadSeverityLevels returns a boolean if a field has been set. +func (o *CreatewizIntegrationRequestParameters) HasUploadSeverityLevels() bool { + if o != nil && !IsNil(o.UploadSeverityLevels) { + return true + } + + return false +} + +// SetUploadSeverityLevels gets a reference to the given []ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS and assigns it to the UploadSeverityLevels field. +func (o *CreatewizIntegrationRequestParameters) SetUploadSeverityLevels(v []ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS) { + o.UploadSeverityLevels = v +} + +func (o CreatewizIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o CreatewizIntegrationRequestParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["client_id"] = o.ClientId + toSerialize["client_secret"] = o.ClientSecret + toSerialize["token_uri"] = o.TokenUri + toSerialize["api_endpoint"] = o.ApiEndpoint + if !IsNil(o.UploadSeverityLevels) { + toSerialize["upload_severity_levels"] = o.UploadSeverityLevels + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *CreatewizIntegrationRequestParameters) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "client_id", + "client_secret", + "token_uri", + "api_endpoint", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varCreatewizIntegrationRequestParameters := _CreatewizIntegrationRequestParameters{} + + err = json.Unmarshal(data, &varCreatewizIntegrationRequestParameters) + + if err != nil { + return err + } + + *o = CreatewizIntegrationRequestParameters(varCreatewizIntegrationRequestParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "client_id") + delete(additionalProperties, "client_secret") + delete(additionalProperties, "token_uri") + delete(additionalProperties, "api_endpoint") + delete(additionalProperties, "upload_severity_levels") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableCreatewizIntegrationRequestParameters struct { + value *CreatewizIntegrationRequestParameters + isSet bool +} + +func (v NullableCreatewizIntegrationRequestParameters) Get() *CreatewizIntegrationRequestParameters { + return v.value +} + +func (v *NullableCreatewizIntegrationRequestParameters) Set(val *CreatewizIntegrationRequestParameters) { + v.value = val + v.isSet = true +} + +func (v NullableCreatewizIntegrationRequestParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableCreatewizIntegrationRequestParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableCreatewizIntegrationRequestParameters(val *CreatewizIntegrationRequestParameters) *NullableCreatewizIntegrationRequestParameters { + return &NullableCreatewizIntegrationRequestParameters{value: val, isSet: true} +} + +func (v NullableCreatewizIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableCreatewizIntegrationRequestParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_enum_asset_class.go b/pkg/api/v3/model_enum_asset_class.go new file mode 100644 index 00000000..4b0b1b30 --- /dev/null +++ b/pkg/api/v3/model_enum_asset_class.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMASSETCLASS the model 'ENUMASSETCLASS' +type ENUMASSETCLASS string + +// List of ENUM_ASSET_CLASS +const ( + ENUMASSETCLASS_ASSET_CLASS ENUMASSETCLASS = "asset.class" +) + +// All allowed values of ENUMASSETCLASS enum +var AllowedENUMASSETCLASSEnumValues = []ENUMASSETCLASS{ + "asset.class", +} + +func (v *ENUMASSETCLASS) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMASSETCLASS(value) + for _, existing := range AllowedENUMASSETCLASSEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMASSETCLASS", value) +} + +// NewENUMASSETCLASSFromValue returns a pointer to a valid ENUMASSETCLASS +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMASSETCLASSFromValue(v string) (*ENUMASSETCLASS, error) { + ev := ENUMASSETCLASS(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMASSETCLASS: valid values are %v", v, AllowedENUMASSETCLASSEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMASSETCLASS) IsValid() bool { + for _, existing := range AllowedENUMASSETCLASSEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_ASSET_CLASS value +func (v ENUMASSETCLASS) Ptr() *ENUMASSETCLASS { + return &v +} + +type NullableENUMASSETCLASS struct { + value *ENUMASSETCLASS + isSet bool +} + +func (v NullableENUMASSETCLASS) Get() *ENUMASSETCLASS { + return v.value +} + +func (v *NullableENUMASSETCLASS) Set(val *ENUMASSETCLASS) { + v.value = val + v.isSet = true +} + +func (v NullableENUMASSETCLASS) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMASSETCLASS) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMASSETCLASS(val *ENUMASSETCLASS) *NullableENUMASSETCLASS { + return &NullableENUMASSETCLASS{value: val, isSet: true} +} + +func (v NullableENUMASSETCLASS) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMASSETCLASS) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_asset_externalurl.go b/pkg/api/v3/model_enum_asset_externalurl.go new file mode 100644 index 00000000..72e18dff --- /dev/null +++ b/pkg/api/v3/model_enum_asset_externalurl.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMASSETEXTERNALURL the model 'ENUMASSETEXTERNALURL' +type ENUMASSETEXTERNALURL string + +// List of ENUM_ASSET_EXTERNALURL +const ( + ENUMASSETEXTERNALURL_ASSET_EXTERNAL_URL ENUMASSETEXTERNALURL = "asset.externalUrl" +) + +// All allowed values of ENUMASSETEXTERNALURL enum +var AllowedENUMASSETEXTERNALURLEnumValues = []ENUMASSETEXTERNALURL{ + "asset.externalUrl", +} + +func (v *ENUMASSETEXTERNALURL) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMASSETEXTERNALURL(value) + for _, existing := range AllowedENUMASSETEXTERNALURLEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMASSETEXTERNALURL", value) +} + +// NewENUMASSETEXTERNALURLFromValue returns a pointer to a valid ENUMASSETEXTERNALURL +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMASSETEXTERNALURLFromValue(v string) (*ENUMASSETEXTERNALURL, error) { + ev := ENUMASSETEXTERNALURL(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMASSETEXTERNALURL: valid values are %v", v, AllowedENUMASSETEXTERNALURLEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMASSETEXTERNALURL) IsValid() bool { + for _, existing := range AllowedENUMASSETEXTERNALURLEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_ASSET_EXTERNALURL value +func (v ENUMASSETEXTERNALURL) Ptr() *ENUMASSETEXTERNALURL { + return &v +} + +type NullableENUMASSETEXTERNALURL struct { + value *ENUMASSETEXTERNALURL + isSet bool +} + +func (v NullableENUMASSETEXTERNALURL) Get() *ENUMASSETEXTERNALURL { + return v.value +} + +func (v *NullableENUMASSETEXTERNALURL) Set(val *ENUMASSETEXTERNALURL) { + v.value = val + v.isSet = true +} + +func (v NullableENUMASSETEXTERNALURL) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMASSETEXTERNALURL) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMASSETEXTERNALURL(val *ENUMASSETEXTERNALURL) *NullableENUMASSETEXTERNALURL { + return &NullableENUMASSETEXTERNALURL{value: val, isSet: true} +} + +func (v NullableENUMASSETEXTERNALURL) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMASSETEXTERNALURL) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_asset_name.go b/pkg/api/v3/model_enum_asset_name.go new file mode 100644 index 00000000..52ca36a9 --- /dev/null +++ b/pkg/api/v3/model_enum_asset_name.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMASSETNAME the model 'ENUMASSETNAME' +type ENUMASSETNAME string + +// List of ENUM_ASSET_NAME +const ( + ENUMASSETNAME_ASSET_NAME ENUMASSETNAME = "asset.name" +) + +// All allowed values of ENUMASSETNAME enum +var AllowedENUMASSETNAMEEnumValues = []ENUMASSETNAME{ + "asset.name", +} + +func (v *ENUMASSETNAME) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMASSETNAME(value) + for _, existing := range AllowedENUMASSETNAMEEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMASSETNAME", value) +} + +// NewENUMASSETNAMEFromValue returns a pointer to a valid ENUMASSETNAME +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMASSETNAMEFromValue(v string) (*ENUMASSETNAME, error) { + ev := ENUMASSETNAME(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMASSETNAME: valid values are %v", v, AllowedENUMASSETNAMEEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMASSETNAME) IsValid() bool { + for _, existing := range AllowedENUMASSETNAMEEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_ASSET_NAME value +func (v ENUMASSETNAME) Ptr() *ENUMASSETNAME { + return &v +} + +type NullableENUMASSETNAME struct { + value *ENUMASSETNAME + isSet bool +} + +func (v NullableENUMASSETNAME) Get() *ENUMASSETNAME { + return v.value +} + +func (v *NullableENUMASSETNAME) Set(val *ENUMASSETNAME) { + v.value = val + v.isSet = true +} + +func (v NullableENUMASSETNAME) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMASSETNAME) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMASSETNAME(val *ENUMASSETNAME) *NullableENUMASSETNAME { + return &NullableENUMASSETNAME{value: val, isSet: true} +} + +func (v NullableENUMASSETNAME) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMASSETNAME) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_asset_tags.go b/pkg/api/v3/model_enum_asset_tags.go new file mode 100644 index 00000000..5d81d48a --- /dev/null +++ b/pkg/api/v3/model_enum_asset_tags.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMASSETTAGS the model 'ENUMASSETTAGS' +type ENUMASSETTAGS string + +// List of ENUM_ASSET_TAGS +const ( + ENUMASSETTAGS_ASSET_TAGS ENUMASSETTAGS = "asset.tags" +) + +// All allowed values of ENUMASSETTAGS enum +var AllowedENUMASSETTAGSEnumValues = []ENUMASSETTAGS{ + "asset.tags", +} + +func (v *ENUMASSETTAGS) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMASSETTAGS(value) + for _, existing := range AllowedENUMASSETTAGSEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMASSETTAGS", value) +} + +// NewENUMASSETTAGSFromValue returns a pointer to a valid ENUMASSETTAGS +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMASSETTAGSFromValue(v string) (*ENUMASSETTAGS, error) { + ev := ENUMASSETTAGS(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMASSETTAGS: valid values are %v", v, AllowedENUMASSETTAGSEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMASSETTAGS) IsValid() bool { + for _, existing := range AllowedENUMASSETTAGSEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_ASSET_TAGS value +func (v ENUMASSETTAGS) Ptr() *ENUMASSETTAGS { + return &v +} + +type NullableENUMASSETTAGS struct { + value *ENUMASSETTAGS + isSet bool +} + +func (v NullableENUMASSETTAGS) Get() *ENUMASSETTAGS { + return v.value +} + +func (v *NullableENUMASSETTAGS) Set(val *ENUMASSETTAGS) { + v.value = val + v.isSet = true +} + +func (v NullableENUMASSETTAGS) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMASSETTAGS) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMASSETTAGS(val *ENUMASSETTAGS) *NullableENUMASSETTAGS { + return &NullableENUMASSETTAGS{value: val, isSet: true} +} + +func (v NullableENUMASSETTAGS) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMASSETTAGS) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_asset_type.go b/pkg/api/v3/model_enum_asset_type.go new file mode 100644 index 00000000..e1c37460 --- /dev/null +++ b/pkg/api/v3/model_enum_asset_type.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMASSETTYPE the model 'ENUMASSETTYPE' +type ENUMASSETTYPE string + +// List of ENUM_ASSET_TYPE +const ( + ENUMASSETTYPE_ASSET_TYPE ENUMASSETTYPE = "asset.type" +) + +// All allowed values of ENUMASSETTYPE enum +var AllowedENUMASSETTYPEEnumValues = []ENUMASSETTYPE{ + "asset.type", +} + +func (v *ENUMASSETTYPE) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMASSETTYPE(value) + for _, existing := range AllowedENUMASSETTYPEEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMASSETTYPE", value) +} + +// NewENUMASSETTYPEFromValue returns a pointer to a valid ENUMASSETTYPE +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMASSETTYPEFromValue(v string) (*ENUMASSETTYPE, error) { + ev := ENUMASSETTYPE(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMASSETTYPE: valid values are %v", v, AllowedENUMASSETTYPEEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMASSETTYPE) IsValid() bool { + for _, existing := range AllowedENUMASSETTYPEEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_ASSET_TYPE value +func (v ENUMASSETTYPE) Ptr() *ENUMASSETTYPE { + return &v +} + +type NullableENUMASSETTYPE struct { + value *ENUMASSETTYPE + isSet bool +} + +func (v NullableENUMASSETTYPE) Get() *ENUMASSETTYPE { + return v.value +} + +func (v *NullableENUMASSETTYPE) Set(val *ENUMASSETTYPE) { + v.value = val + v.isSet = true +} + +func (v NullableENUMASSETTYPE) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMASSETTYPE) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMASSETTYPE(val *ENUMASSETTYPE) *NullableENUMASSETTYPE { + return &NullableENUMASSETTYPE{value: val, isSet: true} +} + +func (v NullableENUMASSETTYPE) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMASSETTYPE) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_asset_url.go b/pkg/api/v3/model_enum_asset_url.go new file mode 100644 index 00000000..a5d09bcd --- /dev/null +++ b/pkg/api/v3/model_enum_asset_url.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMASSETURL the model 'ENUMASSETURL' +type ENUMASSETURL string + +// List of ENUM_ASSET_URL +const ( + ENUMASSETURL_ASSET_URL ENUMASSETURL = "asset.url" +) + +// All allowed values of ENUMASSETURL enum +var AllowedENUMASSETURLEnumValues = []ENUMASSETURL{ + "asset.url", +} + +func (v *ENUMASSETURL) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMASSETURL(value) + for _, existing := range AllowedENUMASSETURLEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMASSETURL", value) +} + +// NewENUMASSETURLFromValue returns a pointer to a valid ENUMASSETURL +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMASSETURLFromValue(v string) (*ENUMASSETURL, error) { + ev := ENUMASSETURL(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMASSETURL: valid values are %v", v, AllowedENUMASSETURLEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMASSETURL) IsValid() bool { + for _, existing := range AllowedENUMASSETURLEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_ASSET_URL value +func (v ENUMASSETURL) Ptr() *ENUMASSETURL { + return &v +} + +type NullableENUMASSETURL struct { + value *ENUMASSETURL + isSet bool +} + +func (v NullableENUMASSETURL) Get() *ENUMASSETURL { + return v.value +} + +func (v *NullableENUMASSETURL) Set(val *ENUMASSETURL) { + v.value = val + v.isSet = true +} + +func (v NullableENUMASSETURL) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMASSETURL) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMASSETURL(val *ENUMASSETURL) *NullableENUMASSETURL { + return &NullableENUMASSETURL{value: val, isSet: true} +} + +func (v NullableENUMASSETURL) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMASSETURL) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_assets.go b/pkg/api/v3/model_enum_assets.go new file mode 100644 index 00000000..10377ade --- /dev/null +++ b/pkg/api/v3/model_enum_assets.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMASSETS the model 'ENUMASSETS' +type ENUMASSETS string + +// List of ENUM_ASSETS +const ( + ENUMASSETS_ASSETS ENUMASSETS = "ASSETS" +) + +// All allowed values of ENUMASSETS enum +var AllowedENUMASSETSEnumValues = []ENUMASSETS{ + "ASSETS", +} + +func (v *ENUMASSETS) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMASSETS(value) + for _, existing := range AllowedENUMASSETSEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMASSETS", value) +} + +// NewENUMASSETSFromValue returns a pointer to a valid ENUMASSETS +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMASSETSFromValue(v string) (*ENUMASSETS, error) { + ev := ENUMASSETS(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMASSETS: valid values are %v", v, AllowedENUMASSETSEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMASSETS) IsValid() bool { + for _, existing := range AllowedENUMASSETSEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_ASSETS value +func (v ENUMASSETS) Ptr() *ENUMASSETS { + return &v +} + +type NullableENUMASSETS struct { + value *ENUMASSETS + isSet bool +} + +func (v NullableENUMASSETS) Get() *ENUMASSETS { + return v.value +} + +func (v *NullableENUMASSETS) Set(val *ENUMASSETS) { + v.value = val + v.isSet = true +} + +func (v NullableENUMASSETS) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMASSETS) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMASSETS(val *ENUMASSETS) *NullableENUMASSETS { + return &NullableENUMASSETS{value: val, isSet: true} +} + +func (v NullableENUMASSETS) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMASSETS) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_customrule_link.go b/pkg/api/v3/model_enum_customrule_link.go new file mode 100644 index 00000000..0d665c02 --- /dev/null +++ b/pkg/api/v3/model_enum_customrule_link.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMCUSTOMRULELINK the model 'ENUMCUSTOMRULELINK' +type ENUMCUSTOMRULELINK string + +// List of ENUM_CUSTOMRULE_LINK +const ( + ENUMCUSTOMRULELINK_CUSTOM_RULE_LINK ENUMCUSTOMRULELINK = "customRule.link" +) + +// All allowed values of ENUMCUSTOMRULELINK enum +var AllowedENUMCUSTOMRULELINKEnumValues = []ENUMCUSTOMRULELINK{ + "customRule.link", +} + +func (v *ENUMCUSTOMRULELINK) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMCUSTOMRULELINK(value) + for _, existing := range AllowedENUMCUSTOMRULELINKEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMCUSTOMRULELINK", value) +} + +// NewENUMCUSTOMRULELINKFromValue returns a pointer to a valid ENUMCUSTOMRULELINK +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMCUSTOMRULELINKFromValue(v string) (*ENUMCUSTOMRULELINK, error) { + ev := ENUMCUSTOMRULELINK(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMCUSTOMRULELINK: valid values are %v", v, AllowedENUMCUSTOMRULELINKEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMCUSTOMRULELINK) IsValid() bool { + for _, existing := range AllowedENUMCUSTOMRULELINKEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_CUSTOMRULE_LINK value +func (v ENUMCUSTOMRULELINK) Ptr() *ENUMCUSTOMRULELINK { + return &v +} + +type NullableENUMCUSTOMRULELINK struct { + value *ENUMCUSTOMRULELINK + isSet bool +} + +func (v NullableENUMCUSTOMRULELINK) Get() *ENUMCUSTOMRULELINK { + return v.value +} + +func (v *NullableENUMCUSTOMRULELINK) Set(val *ENUMCUSTOMRULELINK) { + v.value = val + v.isSet = true +} + +func (v NullableENUMCUSTOMRULELINK) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMCUSTOMRULELINK) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMCUSTOMRULELINK(val *ENUMCUSTOMRULELINK) *NullableENUMCUSTOMRULELINK { + return &NullableENUMCUSTOMRULELINK{value: val, isSet: true} +} + +func (v NullableENUMCUSTOMRULELINK) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMCUSTOMRULELINK) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_customrule_name.go b/pkg/api/v3/model_enum_customrule_name.go new file mode 100644 index 00000000..ef87dea1 --- /dev/null +++ b/pkg/api/v3/model_enum_customrule_name.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMCUSTOMRULENAME the model 'ENUMCUSTOMRULENAME' +type ENUMCUSTOMRULENAME string + +// List of ENUM_CUSTOMRULE_NAME +const ( + ENUMCUSTOMRULENAME_CUSTOM_RULE_NAME ENUMCUSTOMRULENAME = "customRule.name" +) + +// All allowed values of ENUMCUSTOMRULENAME enum +var AllowedENUMCUSTOMRULENAMEEnumValues = []ENUMCUSTOMRULENAME{ + "customRule.name", +} + +func (v *ENUMCUSTOMRULENAME) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMCUSTOMRULENAME(value) + for _, existing := range AllowedENUMCUSTOMRULENAMEEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMCUSTOMRULENAME", value) +} + +// NewENUMCUSTOMRULENAMEFromValue returns a pointer to a valid ENUMCUSTOMRULENAME +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMCUSTOMRULENAMEFromValue(v string) (*ENUMCUSTOMRULENAME, error) { + ev := ENUMCUSTOMRULENAME(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMCUSTOMRULENAME: valid values are %v", v, AllowedENUMCUSTOMRULENAMEEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMCUSTOMRULENAME) IsValid() bool { + for _, existing := range AllowedENUMCUSTOMRULENAMEEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_CUSTOMRULE_NAME value +func (v ENUMCUSTOMRULENAME) Ptr() *ENUMCUSTOMRULENAME { + return &v +} + +type NullableENUMCUSTOMRULENAME struct { + value *ENUMCUSTOMRULENAME + isSet bool +} + +func (v NullableENUMCUSTOMRULENAME) Get() *ENUMCUSTOMRULENAME { + return v.value +} + +func (v *NullableENUMCUSTOMRULENAME) Set(val *ENUMCUSTOMRULENAME) { + v.value = val + v.isSet = true +} + +func (v NullableENUMCUSTOMRULENAME) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMCUSTOMRULENAME) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMCUSTOMRULENAME(val *ENUMCUSTOMRULENAME) *NullableENUMCUSTOMRULENAME { + return &NullableENUMCUSTOMRULENAME{value: val, isSet: true} +} + +func (v NullableENUMCUSTOMRULENAME) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMCUSTOMRULENAME) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_dialog_message.go b/pkg/api/v3/model_enum_dialog_message.go new file mode 100644 index 00000000..926ea5ca --- /dev/null +++ b/pkg/api/v3/model_enum_dialog_message.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMDIALOGMESSAGE the model 'ENUMDIALOGMESSAGE' +type ENUMDIALOGMESSAGE string + +// List of ENUM_DIALOG_MESSAGE +const ( + ENUMDIALOGMESSAGE_DIALOG_MESSAGE ENUMDIALOGMESSAGE = "dialog.message" +) + +// All allowed values of ENUMDIALOGMESSAGE enum +var AllowedENUMDIALOGMESSAGEEnumValues = []ENUMDIALOGMESSAGE{ + "dialog.message", +} + +func (v *ENUMDIALOGMESSAGE) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMDIALOGMESSAGE(value) + for _, existing := range AllowedENUMDIALOGMESSAGEEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMDIALOGMESSAGE", value) +} + +// NewENUMDIALOGMESSAGEFromValue returns a pointer to a valid ENUMDIALOGMESSAGE +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMDIALOGMESSAGEFromValue(v string) (*ENUMDIALOGMESSAGE, error) { + ev := ENUMDIALOGMESSAGE(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMDIALOGMESSAGE: valid values are %v", v, AllowedENUMDIALOGMESSAGEEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMDIALOGMESSAGE) IsValid() bool { + for _, existing := range AllowedENUMDIALOGMESSAGEEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_DIALOG_MESSAGE value +func (v ENUMDIALOGMESSAGE) Ptr() *ENUMDIALOGMESSAGE { + return &v +} + +type NullableENUMDIALOGMESSAGE struct { + value *ENUMDIALOGMESSAGE + isSet bool +} + +func (v NullableENUMDIALOGMESSAGE) Get() *ENUMDIALOGMESSAGE { + return v.value +} + +func (v *NullableENUMDIALOGMESSAGE) Set(val *ENUMDIALOGMESSAGE) { + v.value = val + v.isSet = true +} + +func (v NullableENUMDIALOGMESSAGE) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMDIALOGMESSAGE) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMDIALOGMESSAGE(val *ENUMDIALOGMESSAGE) *NullableENUMDIALOGMESSAGE { + return &NullableENUMDIALOGMESSAGE{value: val, isSet: true} +} + +func (v NullableENUMDIALOGMESSAGE) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMDIALOGMESSAGE) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_discord_webhook.go b/pkg/api/v3/model_enum_discord_webhook.go new file mode 100644 index 00000000..4d3b9dd9 --- /dev/null +++ b/pkg/api/v3/model_enum_discord_webhook.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMDISCORDWEBHOOK the model 'ENUMDISCORDWEBHOOK' +type ENUMDISCORDWEBHOOK string + +// List of ENUM_DISCORD_WEBHOOK +const ( + ENUMDISCORDWEBHOOK_DISCORD_WEBHOOK ENUMDISCORDWEBHOOK = "DISCORD_WEBHOOK" +) + +// All allowed values of ENUMDISCORDWEBHOOK enum +var AllowedENUMDISCORDWEBHOOKEnumValues = []ENUMDISCORDWEBHOOK{ + "DISCORD_WEBHOOK", +} + +func (v *ENUMDISCORDWEBHOOK) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMDISCORDWEBHOOK(value) + for _, existing := range AllowedENUMDISCORDWEBHOOKEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMDISCORDWEBHOOK", value) +} + +// NewENUMDISCORDWEBHOOKFromValue returns a pointer to a valid ENUMDISCORDWEBHOOK +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMDISCORDWEBHOOKFromValue(v string) (*ENUMDISCORDWEBHOOK, error) { + ev := ENUMDISCORDWEBHOOK(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMDISCORDWEBHOOK: valid values are %v", v, AllowedENUMDISCORDWEBHOOKEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMDISCORDWEBHOOK) IsValid() bool { + for _, existing := range AllowedENUMDISCORDWEBHOOKEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_DISCORD_WEBHOOK value +func (v ENUMDISCORDWEBHOOK) Ptr() *ENUMDISCORDWEBHOOK { + return &v +} + +type NullableENUMDISCORDWEBHOOK struct { + value *ENUMDISCORDWEBHOOK + isSet bool +} + +func (v NullableENUMDISCORDWEBHOOK) Get() *ENUMDISCORDWEBHOOK { + return v.value +} + +func (v *NullableENUMDISCORDWEBHOOK) Set(val *ENUMDISCORDWEBHOOK) { + v.value = val + v.isSet = true +} + +func (v NullableENUMDISCORDWEBHOOK) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMDISCORDWEBHOOK) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMDISCORDWEBHOOK(val *ENUMDISCORDWEBHOOK) *NullableENUMDISCORDWEBHOOK { + return &NullableENUMDISCORDWEBHOOK{value: val, isSet: true} +} + +func (v NullableENUMDISCORDWEBHOOK) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMDISCORDWEBHOOK) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_email.go b/pkg/api/v3/model_enum_email.go new file mode 100644 index 00000000..8989b856 --- /dev/null +++ b/pkg/api/v3/model_enum_email.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMEMAIL the model 'ENUMEMAIL' +type ENUMEMAIL string + +// List of ENUM_EMAIL +const ( + ENUMEMAIL_EMAIL ENUMEMAIL = "EMAIL" +) + +// All allowed values of ENUMEMAIL enum +var AllowedENUMEMAILEnumValues = []ENUMEMAIL{ + "EMAIL", +} + +func (v *ENUMEMAIL) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMEMAIL(value) + for _, existing := range AllowedENUMEMAILEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMEMAIL", value) +} + +// NewENUMEMAILFromValue returns a pointer to a valid ENUMEMAIL +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMEMAILFromValue(v string) (*ENUMEMAIL, error) { + ev := ENUMEMAIL(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMEMAIL: valid values are %v", v, AllowedENUMEMAILEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMEMAIL) IsValid() bool { + for _, existing := range AllowedENUMEMAILEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_EMAIL value +func (v ENUMEMAIL) Ptr() *ENUMEMAIL { + return &v +} + +type NullableENUMEMAIL struct { + value *ENUMEMAIL + isSet bool +} + +func (v NullableENUMEMAIL) Get() *ENUMEMAIL { + return v.value +} + +func (v *NullableENUMEMAIL) Set(val *ENUMEMAIL) { + v.value = val + v.isSet = true +} + +func (v NullableENUMEMAIL) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMEMAIL) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMEMAIL(val *ENUMEMAIL) *NullableENUMEMAIL { + return &NullableENUMEMAIL{value: val, isSet: true} +} + +func (v NullableENUMEMAIL) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMEMAIL) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_emails.go b/pkg/api/v3/model_enum_emails.go new file mode 100644 index 00000000..3ea65f93 --- /dev/null +++ b/pkg/api/v3/model_enum_emails.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMEMAILS the model 'ENUMEMAILS' +type ENUMEMAILS string + +// List of ENUM_EMAILS +const ( + ENUMEMAILS_EMAILS ENUMEMAILS = "emails" +) + +// All allowed values of ENUMEMAILS enum +var AllowedENUMEMAILSEnumValues = []ENUMEMAILS{ + "emails", +} + +func (v *ENUMEMAILS) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMEMAILS(value) + for _, existing := range AllowedENUMEMAILSEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMEMAILS", value) +} + +// NewENUMEMAILSFromValue returns a pointer to a valid ENUMEMAILS +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMEMAILSFromValue(v string) (*ENUMEMAILS, error) { + ev := ENUMEMAILS(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMEMAILS: valid values are %v", v, AllowedENUMEMAILSEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMEMAILS) IsValid() bool { + for _, existing := range AllowedENUMEMAILSEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_EMAILS value +func (v ENUMEMAILS) Ptr() *ENUMEMAILS { + return &v +} + +type NullableENUMEMAILS struct { + value *ENUMEMAILS + isSet bool +} + +func (v NullableENUMEMAILS) Get() *ENUMEMAILS { + return v.value +} + +func (v *NullableENUMEMAILS) Set(val *ENUMEMAILS) { + v.value = val + v.isSet = true +} + +func (v NullableENUMEMAILS) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMEMAILS) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMEMAILS(val *ENUMEMAILS) *NullableENUMEMAILS { + return &NullableENUMEMAILS{value: val, isSet: true} +} + +func (v NullableENUMEMAILS) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMEMAILS) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_export.go b/pkg/api/v3/model_enum_export.go new file mode 100644 index 00000000..e61271d3 --- /dev/null +++ b/pkg/api/v3/model_enum_export.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMEXPORT the model 'ENUMEXPORT' +type ENUMEXPORT string + +// List of ENUM_EXPORT +const ( + ENUMEXPORT_EXPORT ENUMEXPORT = "EXPORT" +) + +// All allowed values of ENUMEXPORT enum +var AllowedENUMEXPORTEnumValues = []ENUMEXPORT{ + "EXPORT", +} + +func (v *ENUMEXPORT) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMEXPORT(value) + for _, existing := range AllowedENUMEXPORTEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMEXPORT", value) +} + +// NewENUMEXPORTFromValue returns a pointer to a valid ENUMEXPORT +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMEXPORTFromValue(v string) (*ENUMEXPORT, error) { + ev := ENUMEXPORT(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMEXPORT: valid values are %v", v, AllowedENUMEXPORTEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMEXPORT) IsValid() bool { + for _, existing := range AllowedENUMEXPORTEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_EXPORT value +func (v ENUMEXPORT) Ptr() *ENUMEXPORT { + return &v +} + +type NullableENUMEXPORT struct { + value *ENUMEXPORT + isSet bool +} + +func (v NullableENUMEXPORT) Get() *ENUMEXPORT { + return v.value +} + +func (v *NullableENUMEXPORT) Set(val *ENUMEXPORT) { + v.value = val + v.isSet = true +} + +func (v NullableENUMEXPORT) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMEXPORT) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMEXPORT(val *ENUMEXPORT) *NullableENUMEXPORT { + return &NullableENUMEXPORT{value: val, isSet: true} +} + +func (v NullableENUMEXPORT) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMEXPORT) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_issue_category.go b/pkg/api/v3/model_enum_issue_category.go new file mode 100644 index 00000000..25807e51 --- /dev/null +++ b/pkg/api/v3/model_enum_issue_category.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMISSUECATEGORY the model 'ENUMISSUECATEGORY' +type ENUMISSUECATEGORY string + +// List of ENUM_ISSUE_CATEGORY +const ( + ENUMISSUECATEGORY_ISSUE_CATEGORY ENUMISSUECATEGORY = "issue.category" +) + +// All allowed values of ENUMISSUECATEGORY enum +var AllowedENUMISSUECATEGORYEnumValues = []ENUMISSUECATEGORY{ + "issue.category", +} + +func (v *ENUMISSUECATEGORY) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMISSUECATEGORY(value) + for _, existing := range AllowedENUMISSUECATEGORYEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMISSUECATEGORY", value) +} + +// NewENUMISSUECATEGORYFromValue returns a pointer to a valid ENUMISSUECATEGORY +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMISSUECATEGORYFromValue(v string) (*ENUMISSUECATEGORY, error) { + ev := ENUMISSUECATEGORY(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMISSUECATEGORY: valid values are %v", v, AllowedENUMISSUECATEGORYEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMISSUECATEGORY) IsValid() bool { + for _, existing := range AllowedENUMISSUECATEGORYEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_ISSUE_CATEGORY value +func (v ENUMISSUECATEGORY) Ptr() *ENUMISSUECATEGORY { + return &v +} + +type NullableENUMISSUECATEGORY struct { + value *ENUMISSUECATEGORY + isSet bool +} + +func (v NullableENUMISSUECATEGORY) Get() *ENUMISSUECATEGORY { + return v.value +} + +func (v *NullableENUMISSUECATEGORY) Set(val *ENUMISSUECATEGORY) { + v.value = val + v.isSet = true +} + +func (v NullableENUMISSUECATEGORY) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMISSUECATEGORY) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMISSUECATEGORY(val *ENUMISSUECATEGORY) *NullableENUMISSUECATEGORY { + return &NullableENUMISSUECATEGORY{value: val, isSet: true} +} + +func (v NullableENUMISSUECATEGORY) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMISSUECATEGORY) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_issue_context.go b/pkg/api/v3/model_enum_issue_context.go new file mode 100644 index 00000000..07fea8a5 --- /dev/null +++ b/pkg/api/v3/model_enum_issue_context.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMISSUECONTEXT the model 'ENUMISSUECONTEXT' +type ENUMISSUECONTEXT string + +// List of ENUM_ISSUE_CONTEXT +const ( + ENUMISSUECONTEXT_ISSUE_CONTEXT ENUMISSUECONTEXT = "issue.context" +) + +// All allowed values of ENUMISSUECONTEXT enum +var AllowedENUMISSUECONTEXTEnumValues = []ENUMISSUECONTEXT{ + "issue.context", +} + +func (v *ENUMISSUECONTEXT) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMISSUECONTEXT(value) + for _, existing := range AllowedENUMISSUECONTEXTEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMISSUECONTEXT", value) +} + +// NewENUMISSUECONTEXTFromValue returns a pointer to a valid ENUMISSUECONTEXT +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMISSUECONTEXTFromValue(v string) (*ENUMISSUECONTEXT, error) { + ev := ENUMISSUECONTEXT(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMISSUECONTEXT: valid values are %v", v, AllowedENUMISSUECONTEXTEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMISSUECONTEXT) IsValid() bool { + for _, existing := range AllowedENUMISSUECONTEXTEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_ISSUE_CONTEXT value +func (v ENUMISSUECONTEXT) Ptr() *ENUMISSUECONTEXT { + return &v +} + +type NullableENUMISSUECONTEXT struct { + value *ENUMISSUECONTEXT + isSet bool +} + +func (v NullableENUMISSUECONTEXT) Get() *ENUMISSUECONTEXT { + return v.value +} + +func (v *NullableENUMISSUECONTEXT) Set(val *ENUMISSUECONTEXT) { + v.value = val + v.isSet = true +} + +func (v NullableENUMISSUECONTEXT) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMISSUECONTEXT) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMISSUECONTEXT(val *ENUMISSUECONTEXT) *NullableENUMISSUECONTEXT { + return &NullableENUMISSUECONTEXT{value: val, isSet: true} +} + +func (v NullableENUMISSUECONTEXT) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMISSUECONTEXT) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_issue_createdat.go b/pkg/api/v3/model_enum_issue_createdat.go new file mode 100644 index 00000000..750d1687 --- /dev/null +++ b/pkg/api/v3/model_enum_issue_createdat.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMISSUECREATEDAT the model 'ENUMISSUECREATEDAT' +type ENUMISSUECREATEDAT string + +// List of ENUM_ISSUE_CREATEDAT +const ( + ENUMISSUECREATEDAT_ISSUE_CREATED_AT ENUMISSUECREATEDAT = "issue.createdAt" +) + +// All allowed values of ENUMISSUECREATEDAT enum +var AllowedENUMISSUECREATEDATEnumValues = []ENUMISSUECREATEDAT{ + "issue.createdAt", +} + +func (v *ENUMISSUECREATEDAT) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMISSUECREATEDAT(value) + for _, existing := range AllowedENUMISSUECREATEDATEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMISSUECREATEDAT", value) +} + +// NewENUMISSUECREATEDATFromValue returns a pointer to a valid ENUMISSUECREATEDAT +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMISSUECREATEDATFromValue(v string) (*ENUMISSUECREATEDAT, error) { + ev := ENUMISSUECREATEDAT(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMISSUECREATEDAT: valid values are %v", v, AllowedENUMISSUECREATEDATEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMISSUECREATEDAT) IsValid() bool { + for _, existing := range AllowedENUMISSUECREATEDATEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_ISSUE_CREATEDAT value +func (v ENUMISSUECREATEDAT) Ptr() *ENUMISSUECREATEDAT { + return &v +} + +type NullableENUMISSUECREATEDAT struct { + value *ENUMISSUECREATEDAT + isSet bool +} + +func (v NullableENUMISSUECREATEDAT) Get() *ENUMISSUECREATEDAT { + return v.value +} + +func (v *NullableENUMISSUECREATEDAT) Set(val *ENUMISSUECREATEDAT) { + v.value = val + v.isSet = true +} + +func (v NullableENUMISSUECREATEDAT) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMISSUECREATEDAT) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMISSUECREATEDAT(val *ENUMISSUECREATEDAT) *NullableENUMISSUECREATEDAT { + return &NullableENUMISSUECREATEDAT{value: val, isSet: true} +} + +func (v NullableENUMISSUECREATEDAT) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMISSUECREATEDAT) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_issue_linkinallissues.go b/pkg/api/v3/model_enum_issue_linkinallissues.go new file mode 100644 index 00000000..da80e91e --- /dev/null +++ b/pkg/api/v3/model_enum_issue_linkinallissues.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMISSUELINKINALLISSUES the model 'ENUMISSUELINKINALLISSUES' +type ENUMISSUELINKINALLISSUES string + +// List of ENUM_ISSUE_LINKINALLISSUES +const ( + ENUMISSUELINKINALLISSUES_ISSUE_LINK_IN_ALL_ISSUES ENUMISSUELINKINALLISSUES = "issue.linkInAllIssues" +) + +// All allowed values of ENUMISSUELINKINALLISSUES enum +var AllowedENUMISSUELINKINALLISSUESEnumValues = []ENUMISSUELINKINALLISSUES{ + "issue.linkInAllIssues", +} + +func (v *ENUMISSUELINKINALLISSUES) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMISSUELINKINALLISSUES(value) + for _, existing := range AllowedENUMISSUELINKINALLISSUESEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMISSUELINKINALLISSUES", value) +} + +// NewENUMISSUELINKINALLISSUESFromValue returns a pointer to a valid ENUMISSUELINKINALLISSUES +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMISSUELINKINALLISSUESFromValue(v string) (*ENUMISSUELINKINALLISSUES, error) { + ev := ENUMISSUELINKINALLISSUES(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMISSUELINKINALLISSUES: valid values are %v", v, AllowedENUMISSUELINKINALLISSUESEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMISSUELINKINALLISSUES) IsValid() bool { + for _, existing := range AllowedENUMISSUELINKINALLISSUESEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_ISSUE_LINKINALLISSUES value +func (v ENUMISSUELINKINALLISSUES) Ptr() *ENUMISSUELINKINALLISSUES { + return &v +} + +type NullableENUMISSUELINKINALLISSUES struct { + value *ENUMISSUELINKINALLISSUES + isSet bool +} + +func (v NullableENUMISSUELINKINALLISSUES) Get() *ENUMISSUELINKINALLISSUES { + return v.value +} + +func (v *NullableENUMISSUELINKINALLISSUES) Set(val *ENUMISSUELINKINALLISSUES) { + v.value = val + v.isSet = true +} + +func (v NullableENUMISSUELINKINALLISSUES) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMISSUELINKINALLISSUES) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMISSUELINKINALLISSUES(val *ENUMISSUELINKINALLISSUES) *NullableENUMISSUELINKINALLISSUES { + return &NullableENUMISSUELINKINALLISSUES{value: val, isSet: true} +} + +func (v NullableENUMISSUELINKINALLISSUES) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMISSUELINKINALLISSUES) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_issue_linkinasset.go b/pkg/api/v3/model_enum_issue_linkinasset.go new file mode 100644 index 00000000..48301bc7 --- /dev/null +++ b/pkg/api/v3/model_enum_issue_linkinasset.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMISSUELINKINASSET the model 'ENUMISSUELINKINASSET' +type ENUMISSUELINKINASSET string + +// List of ENUM_ISSUE_LINKINASSET +const ( + ENUMISSUELINKINASSET_ISSUE_LINK_IN_ASSET ENUMISSUELINKINASSET = "issue.linkInAsset" +) + +// All allowed values of ENUMISSUELINKINASSET enum +var AllowedENUMISSUELINKINASSETEnumValues = []ENUMISSUELINKINASSET{ + "issue.linkInAsset", +} + +func (v *ENUMISSUELINKINASSET) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMISSUELINKINASSET(value) + for _, existing := range AllowedENUMISSUELINKINASSETEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMISSUELINKINASSET", value) +} + +// NewENUMISSUELINKINASSETFromValue returns a pointer to a valid ENUMISSUELINKINASSET +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMISSUELINKINASSETFromValue(v string) (*ENUMISSUELINKINASSET, error) { + ev := ENUMISSUELINKINASSET(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMISSUELINKINASSET: valid values are %v", v, AllowedENUMISSUELINKINASSETEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMISSUELINKINASSET) IsValid() bool { + for _, existing := range AllowedENUMISSUELINKINASSETEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_ISSUE_LINKINASSET value +func (v ENUMISSUELINKINASSET) Ptr() *ENUMISSUELINKINASSET { + return &v +} + +type NullableENUMISSUELINKINASSET struct { + value *ENUMISSUELINKINASSET + isSet bool +} + +func (v NullableENUMISSUELINKINASSET) Get() *ENUMISSUELINKINASSET { + return v.value +} + +func (v *NullableENUMISSUELINKINASSET) Set(val *ENUMISSUELINKINASSET) { + v.value = val + v.isSet = true +} + +func (v NullableENUMISSUELINKINASSET) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMISSUELINKINASSET) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMISSUELINKINASSET(val *ENUMISSUELINKINASSET) *NullableENUMISSUELINKINASSET { + return &NullableENUMISSUELINKINASSET{value: val, isSet: true} +} + +func (v NullableENUMISSUELINKINASSET) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMISSUELINKINASSET) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_issue_linkinprofile.go b/pkg/api/v3/model_enum_issue_linkinprofile.go new file mode 100644 index 00000000..f7e0ab0b --- /dev/null +++ b/pkg/api/v3/model_enum_issue_linkinprofile.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMISSUELINKINPROFILE the model 'ENUMISSUELINKINPROFILE' +type ENUMISSUELINKINPROFILE string + +// List of ENUM_ISSUE_LINKINPROFILE +const ( + ENUMISSUELINKINPROFILE_ISSUE_LINK_IN_PROFILE ENUMISSUELINKINPROFILE = "issue.linkInProfile" +) + +// All allowed values of ENUMISSUELINKINPROFILE enum +var AllowedENUMISSUELINKINPROFILEEnumValues = []ENUMISSUELINKINPROFILE{ + "issue.linkInProfile", +} + +func (v *ENUMISSUELINKINPROFILE) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMISSUELINKINPROFILE(value) + for _, existing := range AllowedENUMISSUELINKINPROFILEEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMISSUELINKINPROFILE", value) +} + +// NewENUMISSUELINKINPROFILEFromValue returns a pointer to a valid ENUMISSUELINKINPROFILE +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMISSUELINKINPROFILEFromValue(v string) (*ENUMISSUELINKINPROFILE, error) { + ev := ENUMISSUELINKINPROFILE(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMISSUELINKINPROFILE: valid values are %v", v, AllowedENUMISSUELINKINPROFILEEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMISSUELINKINPROFILE) IsValid() bool { + for _, existing := range AllowedENUMISSUELINKINPROFILEEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_ISSUE_LINKINPROFILE value +func (v ENUMISSUELINKINPROFILE) Ptr() *ENUMISSUELINKINPROFILE { + return &v +} + +type NullableENUMISSUELINKINPROFILE struct { + value *ENUMISSUELINKINPROFILE + isSet bool +} + +func (v NullableENUMISSUELINKINPROFILE) Get() *ENUMISSUELINKINPROFILE { + return v.value +} + +func (v *NullableENUMISSUELINKINPROFILE) Set(val *ENUMISSUELINKINPROFILE) { + v.value = val + v.isSet = true +} + +func (v NullableENUMISSUELINKINPROFILE) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMISSUELINKINPROFILE) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMISSUELINKINPROFILE(val *ENUMISSUELINKINPROFILE) *NullableENUMISSUELINKINPROFILE { + return &NullableENUMISSUELINKINPROFILE{value: val, isSet: true} +} + +func (v NullableENUMISSUELINKINPROFILE) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMISSUELINKINPROFILE) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_issue_linkinscan.go b/pkg/api/v3/model_enum_issue_linkinscan.go new file mode 100644 index 00000000..b5789916 --- /dev/null +++ b/pkg/api/v3/model_enum_issue_linkinscan.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMISSUELINKINSCAN the model 'ENUMISSUELINKINSCAN' +type ENUMISSUELINKINSCAN string + +// List of ENUM_ISSUE_LINKINSCAN +const ( + ENUMISSUELINKINSCAN_ISSUE_LINK_IN_SCAN ENUMISSUELINKINSCAN = "issue.linkInScan" +) + +// All allowed values of ENUMISSUELINKINSCAN enum +var AllowedENUMISSUELINKINSCANEnumValues = []ENUMISSUELINKINSCAN{ + "issue.linkInScan", +} + +func (v *ENUMISSUELINKINSCAN) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMISSUELINKINSCAN(value) + for _, existing := range AllowedENUMISSUELINKINSCANEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMISSUELINKINSCAN", value) +} + +// NewENUMISSUELINKINSCANFromValue returns a pointer to a valid ENUMISSUELINKINSCAN +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMISSUELINKINSCANFromValue(v string) (*ENUMISSUELINKINSCAN, error) { + ev := ENUMISSUELINKINSCAN(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMISSUELINKINSCAN: valid values are %v", v, AllowedENUMISSUELINKINSCANEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMISSUELINKINSCAN) IsValid() bool { + for _, existing := range AllowedENUMISSUELINKINSCANEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_ISSUE_LINKINSCAN value +func (v ENUMISSUELINKINSCAN) Ptr() *ENUMISSUELINKINSCAN { + return &v +} + +type NullableENUMISSUELINKINSCAN struct { + value *ENUMISSUELINKINSCAN + isSet bool +} + +func (v NullableENUMISSUELINKINSCAN) Get() *ENUMISSUELINKINSCAN { + return v.value +} + +func (v *NullableENUMISSUELINKINSCAN) Set(val *ENUMISSUELINKINSCAN) { + v.value = val + v.isSet = true +} + +func (v NullableENUMISSUELINKINSCAN) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMISSUELINKINSCAN) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMISSUELINKINSCAN(val *ENUMISSUELINKINSCAN) *NullableENUMISSUELINKINSCAN { + return &NullableENUMISSUELINKINSCAN{value: val, isSet: true} +} + +func (v NullableENUMISSUELINKINSCAN) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMISSUELINKINSCAN) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_issue_name.go b/pkg/api/v3/model_enum_issue_name.go new file mode 100644 index 00000000..9a04ee33 --- /dev/null +++ b/pkg/api/v3/model_enum_issue_name.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMISSUENAME the model 'ENUMISSUENAME' +type ENUMISSUENAME string + +// List of ENUM_ISSUE_NAME +const ( + ENUMISSUENAME_ISSUE_NAME ENUMISSUENAME = "issue.name" +) + +// All allowed values of ENUMISSUENAME enum +var AllowedENUMISSUENAMEEnumValues = []ENUMISSUENAME{ + "issue.name", +} + +func (v *ENUMISSUENAME) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMISSUENAME(value) + for _, existing := range AllowedENUMISSUENAMEEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMISSUENAME", value) +} + +// NewENUMISSUENAMEFromValue returns a pointer to a valid ENUMISSUENAME +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMISSUENAMEFromValue(v string) (*ENUMISSUENAME, error) { + ev := ENUMISSUENAME(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMISSUENAME: valid values are %v", v, AllowedENUMISSUENAMEEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMISSUENAME) IsValid() bool { + for _, existing := range AllowedENUMISSUENAMEEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_ISSUE_NAME value +func (v ENUMISSUENAME) Ptr() *ENUMISSUENAME { + return &v +} + +type NullableENUMISSUENAME struct { + value *ENUMISSUENAME + isSet bool +} + +func (v NullableENUMISSUENAME) Get() *ENUMISSUENAME { + return v.value +} + +func (v *NullableENUMISSUENAME) Set(val *ENUMISSUENAME) { + v.value = val + v.isSet = true +} + +func (v NullableENUMISSUENAME) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMISSUENAME) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMISSUENAME(val *ENUMISSUENAME) *NullableENUMISSUENAME { + return &NullableENUMISSUENAME{value: val, isSet: true} +} + +func (v NullableENUMISSUENAME) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMISSUENAME) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_issue_remediation.go b/pkg/api/v3/model_enum_issue_remediation.go new file mode 100644 index 00000000..79c44b63 --- /dev/null +++ b/pkg/api/v3/model_enum_issue_remediation.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMISSUEREMEDIATION the model 'ENUMISSUEREMEDIATION' +type ENUMISSUEREMEDIATION string + +// List of ENUM_ISSUE_REMEDIATION +const ( + ENUMISSUEREMEDIATION_ISSUE_REMEDIATION ENUMISSUEREMEDIATION = "issue.remediation" +) + +// All allowed values of ENUMISSUEREMEDIATION enum +var AllowedENUMISSUEREMEDIATIONEnumValues = []ENUMISSUEREMEDIATION{ + "issue.remediation", +} + +func (v *ENUMISSUEREMEDIATION) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMISSUEREMEDIATION(value) + for _, existing := range AllowedENUMISSUEREMEDIATIONEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMISSUEREMEDIATION", value) +} + +// NewENUMISSUEREMEDIATIONFromValue returns a pointer to a valid ENUMISSUEREMEDIATION +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMISSUEREMEDIATIONFromValue(v string) (*ENUMISSUEREMEDIATION, error) { + ev := ENUMISSUEREMEDIATION(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMISSUEREMEDIATION: valid values are %v", v, AllowedENUMISSUEREMEDIATIONEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMISSUEREMEDIATION) IsValid() bool { + for _, existing := range AllowedENUMISSUEREMEDIATIONEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_ISSUE_REMEDIATION value +func (v ENUMISSUEREMEDIATION) Ptr() *ENUMISSUEREMEDIATION { + return &v +} + +type NullableENUMISSUEREMEDIATION struct { + value *ENUMISSUEREMEDIATION + isSet bool +} + +func (v NullableENUMISSUEREMEDIATION) Get() *ENUMISSUEREMEDIATION { + return v.value +} + +func (v *NullableENUMISSUEREMEDIATION) Set(val *ENUMISSUEREMEDIATION) { + v.value = val + v.isSet = true +} + +func (v NullableENUMISSUEREMEDIATION) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMISSUEREMEDIATION) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMISSUEREMEDIATION(val *ENUMISSUEREMEDIATION) *NullableENUMISSUEREMEDIATION { + return &NullableENUMISSUEREMEDIATION{value: val, isSet: true} +} + +func (v NullableENUMISSUEREMEDIATION) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMISSUEREMEDIATION) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_issue_severity.go b/pkg/api/v3/model_enum_issue_severity.go new file mode 100644 index 00000000..9a932631 --- /dev/null +++ b/pkg/api/v3/model_enum_issue_severity.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMISSUESEVERITY the model 'ENUMISSUESEVERITY' +type ENUMISSUESEVERITY string + +// List of ENUM_ISSUE_SEVERITY +const ( + ENUMISSUESEVERITY_ISSUE_SEVERITY ENUMISSUESEVERITY = "issue.severity" +) + +// All allowed values of ENUMISSUESEVERITY enum +var AllowedENUMISSUESEVERITYEnumValues = []ENUMISSUESEVERITY{ + "issue.severity", +} + +func (v *ENUMISSUESEVERITY) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMISSUESEVERITY(value) + for _, existing := range AllowedENUMISSUESEVERITYEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMISSUESEVERITY", value) +} + +// NewENUMISSUESEVERITYFromValue returns a pointer to a valid ENUMISSUESEVERITY +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMISSUESEVERITYFromValue(v string) (*ENUMISSUESEVERITY, error) { + ev := ENUMISSUESEVERITY(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMISSUESEVERITY: valid values are %v", v, AllowedENUMISSUESEVERITYEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMISSUESEVERITY) IsValid() bool { + for _, existing := range AllowedENUMISSUESEVERITYEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_ISSUE_SEVERITY value +func (v ENUMISSUESEVERITY) Ptr() *ENUMISSUESEVERITY { + return &v +} + +type NullableENUMISSUESEVERITY struct { + value *ENUMISSUESEVERITY + isSet bool +} + +func (v NullableENUMISSUESEVERITY) Get() *ENUMISSUESEVERITY { + return v.value +} + +func (v *NullableENUMISSUESEVERITY) Set(val *ENUMISSUESEVERITY) { + v.value = val + v.isSet = true +} + +func (v NullableENUMISSUESEVERITY) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMISSUESEVERITY) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMISSUESEVERITY(val *ENUMISSUESEVERITY) *NullableENUMISSUESEVERITY { + return &NullableENUMISSUESEVERITY{value: val, isSet: true} +} + +func (v NullableENUMISSUESEVERITY) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMISSUESEVERITY) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_issue_status.go b/pkg/api/v3/model_enum_issue_status.go new file mode 100644 index 00000000..727c2d9d --- /dev/null +++ b/pkg/api/v3/model_enum_issue_status.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMISSUESTATUS the model 'ENUMISSUESTATUS' +type ENUMISSUESTATUS string + +// List of ENUM_ISSUE_STATUS +const ( + ENUMISSUESTATUS_ISSUE_STATUS ENUMISSUESTATUS = "issue.status" +) + +// All allowed values of ENUMISSUESTATUS enum +var AllowedENUMISSUESTATUSEnumValues = []ENUMISSUESTATUS{ + "issue.status", +} + +func (v *ENUMISSUESTATUS) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMISSUESTATUS(value) + for _, existing := range AllowedENUMISSUESTATUSEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMISSUESTATUS", value) +} + +// NewENUMISSUESTATUSFromValue returns a pointer to a valid ENUMISSUESTATUS +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMISSUESTATUSFromValue(v string) (*ENUMISSUESTATUS, error) { + ev := ENUMISSUESTATUS(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMISSUESTATUS: valid values are %v", v, AllowedENUMISSUESTATUSEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMISSUESTATUS) IsValid() bool { + for _, existing := range AllowedENUMISSUESTATUSEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_ISSUE_STATUS value +func (v ENUMISSUESTATUS) Ptr() *ENUMISSUESTATUS { + return &v +} + +type NullableENUMISSUESTATUS struct { + value *ENUMISSUESTATUS + isSet bool +} + +func (v NullableENUMISSUESTATUS) Get() *ENUMISSUESTATUS { + return v.value +} + +func (v *NullableENUMISSUESTATUS) Set(val *ENUMISSUESTATUS) { + v.value = val + v.isSet = true +} + +func (v NullableENUMISSUESTATUS) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMISSUESTATUS) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMISSUESTATUS(val *ENUMISSUESTATUS) *NullableENUMISSUESTATUS { + return &NullableENUMISSUESTATUS{value: val, isSet: true} +} + +func (v NullableENUMISSUESTATUS) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMISSUESTATUS) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_issue_targets.go b/pkg/api/v3/model_enum_issue_targets.go new file mode 100644 index 00000000..a97bc8e9 --- /dev/null +++ b/pkg/api/v3/model_enum_issue_targets.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMISSUETARGETS the model 'ENUMISSUETARGETS' +type ENUMISSUETARGETS string + +// List of ENUM_ISSUE_TARGETS +const ( + ENUMISSUETARGETS_ISSUE_TARGETS ENUMISSUETARGETS = "issue.targets" +) + +// All allowed values of ENUMISSUETARGETS enum +var AllowedENUMISSUETARGETSEnumValues = []ENUMISSUETARGETS{ + "issue.targets", +} + +func (v *ENUMISSUETARGETS) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMISSUETARGETS(value) + for _, existing := range AllowedENUMISSUETARGETSEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMISSUETARGETS", value) +} + +// NewENUMISSUETARGETSFromValue returns a pointer to a valid ENUMISSUETARGETS +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMISSUETARGETSFromValue(v string) (*ENUMISSUETARGETS, error) { + ev := ENUMISSUETARGETS(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMISSUETARGETS: valid values are %v", v, AllowedENUMISSUETARGETSEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMISSUETARGETS) IsValid() bool { + for _, existing := range AllowedENUMISSUETARGETSEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_ISSUE_TARGETS value +func (v ENUMISSUETARGETS) Ptr() *ENUMISSUETARGETS { + return &v +} + +type NullableENUMISSUETARGETS struct { + value *ENUMISSUETARGETS + isSet bool +} + +func (v NullableENUMISSUETARGETS) Get() *ENUMISSUETARGETS { + return v.value +} + +func (v *NullableENUMISSUETARGETS) Set(val *ENUMISSUETARGETS) { + v.value = val + v.isSet = true +} + +func (v NullableENUMISSUETARGETS) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMISSUETARGETS) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMISSUETARGETS(val *ENUMISSUETARGETS) *NullableENUMISSUETARGETS { + return &NullableENUMISSUETARGETS{value: val, isSet: true} +} + +func (v NullableENUMISSUETARGETS) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMISSUETARGETS) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_issues.go b/pkg/api/v3/model_enum_issues.go new file mode 100644 index 00000000..fa11cc34 --- /dev/null +++ b/pkg/api/v3/model_enum_issues.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMISSUES the model 'ENUMISSUES' +type ENUMISSUES string + +// List of ENUM_ISSUES +const ( + ENUMISSUES_ISSUES ENUMISSUES = "ISSUES" +) + +// All allowed values of ENUMISSUES enum +var AllowedENUMISSUESEnumValues = []ENUMISSUES{ + "ISSUES", +} + +func (v *ENUMISSUES) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMISSUES(value) + for _, existing := range AllowedENUMISSUESEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMISSUES", value) +} + +// NewENUMISSUESFromValue returns a pointer to a valid ENUMISSUES +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMISSUESFromValue(v string) (*ENUMISSUES, error) { + ev := ENUMISSUES(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMISSUES: valid values are %v", v, AllowedENUMISSUESEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMISSUES) IsValid() bool { + for _, existing := range AllowedENUMISSUESEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_ISSUES value +func (v ENUMISSUES) Ptr() *ENUMISSUES { + return &v +} + +type NullableENUMISSUES struct { + value *ENUMISSUES + isSet bool +} + +func (v NullableENUMISSUES) Get() *ENUMISSUES { + return v.value +} + +func (v *NullableENUMISSUES) Set(val *ENUMISSUES) { + v.value = val + v.isSet = true +} + +func (v NullableENUMISSUES) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMISSUES) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMISSUES(val *ENUMISSUES) *NullableENUMISSUES { + return &NullableENUMISSUES{value: val, isSet: true} +} + +func (v NullableENUMISSUES) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMISSUES) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_jira.go b/pkg/api/v3/model_enum_jira.go new file mode 100644 index 00000000..c807d29e --- /dev/null +++ b/pkg/api/v3/model_enum_jira.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMJIRA the model 'ENUMJIRA' +type ENUMJIRA string + +// List of ENUM_JIRA +const ( + ENUMJIRA_JIRA ENUMJIRA = "JIRA" +) + +// All allowed values of ENUMJIRA enum +var AllowedENUMJIRAEnumValues = []ENUMJIRA{ + "JIRA", +} + +func (v *ENUMJIRA) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMJIRA(value) + for _, existing := range AllowedENUMJIRAEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMJIRA", value) +} + +// NewENUMJIRAFromValue returns a pointer to a valid ENUMJIRA +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMJIRAFromValue(v string) (*ENUMJIRA, error) { + ev := ENUMJIRA(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMJIRA: valid values are %v", v, AllowedENUMJIRAEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMJIRA) IsValid() bool { + for _, existing := range AllowedENUMJIRAEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_JIRA value +func (v ENUMJIRA) Ptr() *ENUMJIRA { + return &v +} + +type NullableENUMJIRA struct { + value *ENUMJIRA + isSet bool +} + +func (v NullableENUMJIRA) Get() *ENUMJIRA { + return v.value +} + +func (v *NullableENUMJIRA) Set(val *ENUMJIRA) { + v.value = val + v.isSet = true +} + +func (v NullableENUMJIRA) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMJIRA) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMJIRA(val *ENUMJIRA) *NullableENUMJIRA { + return &NullableENUMJIRA{value: val, isSet: true} +} + +func (v NullableENUMJIRA) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMJIRA) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_notify.go b/pkg/api/v3/model_enum_notify.go new file mode 100644 index 00000000..a31d4b56 --- /dev/null +++ b/pkg/api/v3/model_enum_notify.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMNOTIFY the model 'ENUMNOTIFY' +type ENUMNOTIFY string + +// List of ENUM_NOTIFY +const ( + ENUMNOTIFY_NOTIFY ENUMNOTIFY = "NOTIFY" +) + +// All allowed values of ENUMNOTIFY enum +var AllowedENUMNOTIFYEnumValues = []ENUMNOTIFY{ + "NOTIFY", +} + +func (v *ENUMNOTIFY) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMNOTIFY(value) + for _, existing := range AllowedENUMNOTIFYEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMNOTIFY", value) +} + +// NewENUMNOTIFYFromValue returns a pointer to a valid ENUMNOTIFY +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMNOTIFYFromValue(v string) (*ENUMNOTIFY, error) { + ev := ENUMNOTIFY(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMNOTIFY: valid values are %v", v, AllowedENUMNOTIFYEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMNOTIFY) IsValid() bool { + for _, existing := range AllowedENUMNOTIFYEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_NOTIFY value +func (v ENUMNOTIFY) Ptr() *ENUMNOTIFY { + return &v +} + +type NullableENUMNOTIFY struct { + value *ENUMNOTIFY + isSet bool +} + +func (v NullableENUMNOTIFY) Get() *ENUMNOTIFY { + return v.value +} + +func (v *NullableENUMNOTIFY) Set(val *ENUMNOTIFY) { + v.value = val + v.isSet = true +} + +func (v NullableENUMNOTIFY) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMNOTIFY) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMNOTIFY(val *ENUMNOTIFY) *NullableENUMNOTIFY { + return &NullableENUMNOTIFY{value: val, isSet: true} +} + +func (v NullableENUMNOTIFY) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMNOTIFY) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_owners.go b/pkg/api/v3/model_enum_owners.go new file mode 100644 index 00000000..5b1c4355 --- /dev/null +++ b/pkg/api/v3/model_enum_owners.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMOWNERS the model 'ENUMOWNERS' +type ENUMOWNERS string + +// List of ENUM_OWNERS +const ( + ENUMOWNERS_OWNERS ENUMOWNERS = "owners" +) + +// All allowed values of ENUMOWNERS enum +var AllowedENUMOWNERSEnumValues = []ENUMOWNERS{ + "owners", +} + +func (v *ENUMOWNERS) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMOWNERS(value) + for _, existing := range AllowedENUMOWNERSEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMOWNERS", value) +} + +// NewENUMOWNERSFromValue returns a pointer to a valid ENUMOWNERS +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMOWNERSFromValue(v string) (*ENUMOWNERS, error) { + ev := ENUMOWNERS(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMOWNERS: valid values are %v", v, AllowedENUMOWNERSEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMOWNERS) IsValid() bool { + for _, existing := range AllowedENUMOWNERSEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_OWNERS value +func (v ENUMOWNERS) Ptr() *ENUMOWNERS { + return &v +} + +type NullableENUMOWNERS struct { + value *ENUMOWNERS + isSet bool +} + +func (v NullableENUMOWNERS) Get() *ENUMOWNERS { + return v.value +} + +func (v *NullableENUMOWNERS) Set(val *ENUMOWNERS) { + v.value = val + v.isSet = true +} + +func (v NullableENUMOWNERS) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMOWNERS) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMOWNERS(val *ENUMOWNERS) *NullableENUMOWNERS { + return &NullableENUMOWNERS{value: val, isSet: true} +} + +func (v NullableENUMOWNERS) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMOWNERS) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_profile_name.go b/pkg/api/v3/model_enum_profile_name.go new file mode 100644 index 00000000..a779a954 --- /dev/null +++ b/pkg/api/v3/model_enum_profile_name.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMPROFILENAME the model 'ENUMPROFILENAME' +type ENUMPROFILENAME string + +// List of ENUM_PROFILE_NAME +const ( + ENUMPROFILENAME_PROFILE_NAME ENUMPROFILENAME = "profile.name" +) + +// All allowed values of ENUMPROFILENAME enum +var AllowedENUMPROFILENAMEEnumValues = []ENUMPROFILENAME{ + "profile.name", +} + +func (v *ENUMPROFILENAME) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMPROFILENAME(value) + for _, existing := range AllowedENUMPROFILENAMEEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMPROFILENAME", value) +} + +// NewENUMPROFILENAMEFromValue returns a pointer to a valid ENUMPROFILENAME +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMPROFILENAMEFromValue(v string) (*ENUMPROFILENAME, error) { + ev := ENUMPROFILENAME(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMPROFILENAME: valid values are %v", v, AllowedENUMPROFILENAMEEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMPROFILENAME) IsValid() bool { + for _, existing := range AllowedENUMPROFILENAMEEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_PROFILE_NAME value +func (v ENUMPROFILENAME) Ptr() *ENUMPROFILENAME { + return &v +} + +type NullableENUMPROFILENAME struct { + value *ENUMPROFILENAME + isSet bool +} + +func (v NullableENUMPROFILENAME) Get() *ENUMPROFILENAME { + return v.value +} + +func (v *NullableENUMPROFILENAME) Set(val *ENUMPROFILENAME) { + v.value = val + v.isSet = true +} + +func (v NullableENUMPROFILENAME) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMPROFILENAME) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMPROFILENAME(val *ENUMPROFILENAME) *NullableENUMPROFILENAME { + return &NullableENUMPROFILENAME{value: val, isSet: true} +} + +func (v NullableENUMPROFILENAME) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMPROFILENAME) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_profile_scannerkind.go b/pkg/api/v3/model_enum_profile_scannerkind.go new file mode 100644 index 00000000..9006c634 --- /dev/null +++ b/pkg/api/v3/model_enum_profile_scannerkind.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMPROFILESCANNERKIND the model 'ENUMPROFILESCANNERKIND' +type ENUMPROFILESCANNERKIND string + +// List of ENUM_PROFILE_SCANNERKIND +const ( + ENUMPROFILESCANNERKIND_PROFILE_SCANNER_KIND ENUMPROFILESCANNERKIND = "profile.scannerKind" +) + +// All allowed values of ENUMPROFILESCANNERKIND enum +var AllowedENUMPROFILESCANNERKINDEnumValues = []ENUMPROFILESCANNERKIND{ + "profile.scannerKind", +} + +func (v *ENUMPROFILESCANNERKIND) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMPROFILESCANNERKIND(value) + for _, existing := range AllowedENUMPROFILESCANNERKINDEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMPROFILESCANNERKIND", value) +} + +// NewENUMPROFILESCANNERKINDFromValue returns a pointer to a valid ENUMPROFILESCANNERKIND +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMPROFILESCANNERKINDFromValue(v string) (*ENUMPROFILESCANNERKIND, error) { + ev := ENUMPROFILESCANNERKIND(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMPROFILESCANNERKIND: valid values are %v", v, AllowedENUMPROFILESCANNERKINDEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMPROFILESCANNERKIND) IsValid() bool { + for _, existing := range AllowedENUMPROFILESCANNERKINDEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_PROFILE_SCANNERKIND value +func (v ENUMPROFILESCANNERKIND) Ptr() *ENUMPROFILESCANNERKIND { + return &v +} + +type NullableENUMPROFILESCANNERKIND struct { + value *ENUMPROFILESCANNERKIND + isSet bool +} + +func (v NullableENUMPROFILESCANNERKIND) Get() *ENUMPROFILESCANNERKIND { + return v.value +} + +func (v *NullableENUMPROFILESCANNERKIND) Set(val *ENUMPROFILESCANNERKIND) { + v.value = val + v.isSet = true +} + +func (v NullableENUMPROFILESCANNERKIND) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMPROFILESCANNERKIND) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMPROFILESCANNERKIND(val *ENUMPROFILESCANNERKIND) *NullableENUMPROFILESCANNERKIND { + return &NullableENUMPROFILESCANNERKIND{value: val, isSet: true} +} + +func (v NullableENUMPROFILESCANNERKIND) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMPROFILESCANNERKIND) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_profiles.go b/pkg/api/v3/model_enum_profiles.go new file mode 100644 index 00000000..c10479c7 --- /dev/null +++ b/pkg/api/v3/model_enum_profiles.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMPROFILES the model 'ENUMPROFILES' +type ENUMPROFILES string + +// List of ENUM_PROFILES +const ( + ENUMPROFILES_PROFILES ENUMPROFILES = "PROFILES" +) + +// All allowed values of ENUMPROFILES enum +var AllowedENUMPROFILESEnumValues = []ENUMPROFILES{ + "PROFILES", +} + +func (v *ENUMPROFILES) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMPROFILES(value) + for _, existing := range AllowedENUMPROFILESEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMPROFILES", value) +} + +// NewENUMPROFILESFromValue returns a pointer to a valid ENUMPROFILES +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMPROFILESFromValue(v string) (*ENUMPROFILES, error) { + ev := ENUMPROFILES(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMPROFILES: valid values are %v", v, AllowedENUMPROFILESEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMPROFILES) IsValid() bool { + for _, existing := range AllowedENUMPROFILESEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_PROFILES value +func (v ENUMPROFILES) Ptr() *ENUMPROFILES { + return &v +} + +type NullableENUMPROFILES struct { + value *ENUMPROFILES + isSet bool +} + +func (v NullableENUMPROFILES) Get() *ENUMPROFILES { + return v.value +} + +func (v *NullableENUMPROFILES) Set(val *ENUMPROFILES) { + v.value = val + v.isSet = true +} + +func (v NullableENUMPROFILES) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMPROFILES) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMPROFILES(val *ENUMPROFILES) *NullableENUMPROFILES { + return &NullableENUMPROFILES{value: val, isSet: true} +} + +func (v NullableENUMPROFILES) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMPROFILES) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_properties_actions_items_0_properties_parameters_properties_format.go b/pkg/api/v3/model_enum_properties_actions_items_0_properties_parameters_properties_format.go new file mode 100644 index 00000000..5f50f38a --- /dev/null +++ b/pkg/api/v3/model_enum_properties_actions_items_0_properties_parameters_properties_format.go @@ -0,0 +1,111 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT the model 'ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT' +type ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT string + +// List of ENUM_PROPERTIES_ACTIONS_ITEMS_0_PROPERTIES_PARAMETERS_PROPERTIES_FORMAT +const ( + ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT_JSON ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT = "json" + ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT_XML ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT = "xml" +) + +// All allowed values of ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT enum +var AllowedENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMATEnumValues = []ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT{ + "json", + "xml", +} + +func (v *ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT(value) + for _, existing := range AllowedENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMATEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT", value) +} + +// NewENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMATFromValue returns a pointer to a valid ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMATFromValue(v string) (*ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT, error) { + ev := ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT: valid values are %v", v, AllowedENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMATEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT) IsValid() bool { + for _, existing := range AllowedENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMATEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_PROPERTIES_ACTIONS_ITEMS_0_PROPERTIES_PARAMETERS_PROPERTIES_FORMAT value +func (v ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT) Ptr() *ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT { + return &v +} + +type NullableENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT struct { + value *ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT + isSet bool +} + +func (v NullableENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT) Get() *ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT { + return v.value +} + +func (v *NullableENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT) Set(val *ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT) { + v.value = val + v.isSet = true +} + +func (v NullableENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT(val *ENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT) *NullableENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT { + return &NullableENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT{value: val, isSet: true} +} + +func (v NullableENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMPROPERTIESACTIONSITEMS0PROPERTIESPARAMETERSPROPERTIESFORMAT) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_properties_actions_items_properties_type.go b/pkg/api/v3/model_enum_properties_actions_items_properties_type.go new file mode 100644 index 00000000..531072ab --- /dev/null +++ b/pkg/api/v3/model_enum_properties_actions_items_properties_type.go @@ -0,0 +1,111 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE the model 'ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE' +type ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE string + +// List of ENUM_PROPERTIES_ACTIONS_ITEMS_PROPERTIES_TYPE +const ( + ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE_EXPORT ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE = "EXPORT" + ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE_NOTIFY ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE = "NOTIFY" +) + +// All allowed values of ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE enum +var AllowedENUMPROPERTIESACTIONSITEMSPROPERTIESTYPEEnumValues = []ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE{ + "EXPORT", + "NOTIFY", +} + +func (v *ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE(value) + for _, existing := range AllowedENUMPROPERTIESACTIONSITEMSPROPERTIESTYPEEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE", value) +} + +// NewENUMPROPERTIESACTIONSITEMSPROPERTIESTYPEFromValue returns a pointer to a valid ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMPROPERTIESACTIONSITEMSPROPERTIESTYPEFromValue(v string) (*ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE, error) { + ev := ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE: valid values are %v", v, AllowedENUMPROPERTIESACTIONSITEMSPROPERTIESTYPEEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE) IsValid() bool { + for _, existing := range AllowedENUMPROPERTIESACTIONSITEMSPROPERTIESTYPEEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_PROPERTIES_ACTIONS_ITEMS_PROPERTIES_TYPE value +func (v ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE) Ptr() *ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE { + return &v +} + +type NullableENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE struct { + value *ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE + isSet bool +} + +func (v NullableENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE) Get() *ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE { + return v.value +} + +func (v *NullableENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE) Set(val *ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE) { + v.value = val + v.isSet = true +} + +func (v NullableENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE(val *ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE) *NullableENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE { + return &NullableENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE{value: val, isSet: true} +} + +func (v NullableENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_properties_data_items_properties_kind.go b/pkg/api/v3/model_enum_properties_data_items_properties_kind.go new file mode 100644 index 00000000..7b002f36 --- /dev/null +++ b/pkg/api/v3/model_enum_properties_data_items_properties_kind.go @@ -0,0 +1,151 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMPROPERTIESDATAITEMSPROPERTIESKIND The kind of the integration +type ENUMPROPERTIESDATAITEMSPROPERTIESKIND string + +// List of ENUM_PROPERTIES_DATA_ITEMS_PROPERTIES_KIND +const ( + ENUMPROPERTIESDATAITEMSPROPERTIESKIND_AKAMAI ENUMPROPERTIESDATAITEMSPROPERTIESKIND = "AKAMAI" + ENUMPROPERTIESDATAITEMSPROPERTIESKIND_APIGEE ENUMPROPERTIESDATAITEMSPROPERTIESKIND = "APIGEE" + ENUMPROPERTIESDATAITEMSPROPERTIESKIND_AWS ENUMPROPERTIESDATAITEMSPROPERTIESKIND = "AWS" + ENUMPROPERTIESDATAITEMSPROPERTIESKIND_AZURE ENUMPROPERTIESDATAITEMSPROPERTIESKIND = "AZURE" + ENUMPROPERTIESDATAITEMSPROPERTIESKIND_AZURE_DEVOPS ENUMPROPERTIESDATAITEMSPROPERTIESKIND = "AZURE_DEVOPS" + ENUMPROPERTIESDATAITEMSPROPERTIESKIND_BITBUCKET_REPO ENUMPROPERTIESDATAITEMSPROPERTIESKIND = "BITBUCKET_REPO" + ENUMPROPERTIESDATAITEMSPROPERTIESKIND_CLOUDFLARE ENUMPROPERTIESDATAITEMSPROPERTIESKIND = "CLOUDFLARE" + ENUMPROPERTIESDATAITEMSPROPERTIESKIND_DISCORD_WEBHOOK ENUMPROPERTIESDATAITEMSPROPERTIESKIND = "DISCORD_WEBHOOK" + ENUMPROPERTIESDATAITEMSPROPERTIESKIND_DNS ENUMPROPERTIESDATAITEMSPROPERTIESKIND = "DNS" + ENUMPROPERTIESDATAITEMSPROPERTIESKIND_EMAIL ENUMPROPERTIESDATAITEMSPROPERTIESKIND = "EMAIL" + ENUMPROPERTIESDATAITEMSPROPERTIESKIND_GCP ENUMPROPERTIESDATAITEMSPROPERTIESKIND = "GCP" + ENUMPROPERTIESDATAITEMSPROPERTIESKIND_GITHUB_API_KEY ENUMPROPERTIESDATAITEMSPROPERTIESKIND = "GITHUB_API_KEY" + ENUMPROPERTIESDATAITEMSPROPERTIESKIND_GITLAB_API_KEY ENUMPROPERTIESDATAITEMSPROPERTIESKIND = "GITLAB_API_KEY" + ENUMPROPERTIESDATAITEMSPROPERTIESKIND_JIRA ENUMPROPERTIESDATAITEMSPROPERTIESKIND = "JIRA" + ENUMPROPERTIESDATAITEMSPROPERTIESKIND_KONG_GATEWAY ENUMPROPERTIESDATAITEMSPROPERTIESKIND = "KONG_GATEWAY" + ENUMPROPERTIESDATAITEMSPROPERTIESKIND_KONG_KONNECT ENUMPROPERTIESDATAITEMSPROPERTIESKIND = "KONG_KONNECT" + ENUMPROPERTIESDATAITEMSPROPERTIESKIND_KUBERNETES ENUMPROPERTIESDATAITEMSPROPERTIESKIND = "KUBERNETES" + ENUMPROPERTIESDATAITEMSPROPERTIESKIND_POSTMAN_API_KEY ENUMPROPERTIESDATAITEMSPROPERTIESKIND = "POSTMAN_API_KEY" + ENUMPROPERTIESDATAITEMSPROPERTIESKIND_SLACK_WEBHOOK ENUMPROPERTIESDATAITEMSPROPERTIESKIND = "SLACK_WEBHOOK" + ENUMPROPERTIESDATAITEMSPROPERTIESKIND_TEAMS_WEBHOOK ENUMPROPERTIESDATAITEMSPROPERTIESKIND = "TEAMS_WEBHOOK" + ENUMPROPERTIESDATAITEMSPROPERTIESKIND_WEBHOOK ENUMPROPERTIESDATAITEMSPROPERTIESKIND = "WEBHOOK" + ENUMPROPERTIESDATAITEMSPROPERTIESKIND_WIZ ENUMPROPERTIESDATAITEMSPROPERTIESKIND = "WIZ" +) + +// All allowed values of ENUMPROPERTIESDATAITEMSPROPERTIESKIND enum +var AllowedENUMPROPERTIESDATAITEMSPROPERTIESKINDEnumValues = []ENUMPROPERTIESDATAITEMSPROPERTIESKIND{ + "AKAMAI", + "APIGEE", + "AWS", + "AZURE", + "AZURE_DEVOPS", + "BITBUCKET_REPO", + "CLOUDFLARE", + "DISCORD_WEBHOOK", + "DNS", + "EMAIL", + "GCP", + "GITHUB_API_KEY", + "GITLAB_API_KEY", + "JIRA", + "KONG_GATEWAY", + "KONG_KONNECT", + "KUBERNETES", + "POSTMAN_API_KEY", + "SLACK_WEBHOOK", + "TEAMS_WEBHOOK", + "WEBHOOK", + "WIZ", +} + +func (v *ENUMPROPERTIESDATAITEMSPROPERTIESKIND) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMPROPERTIESDATAITEMSPROPERTIESKIND(value) + for _, existing := range AllowedENUMPROPERTIESDATAITEMSPROPERTIESKINDEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMPROPERTIESDATAITEMSPROPERTIESKIND", value) +} + +// NewENUMPROPERTIESDATAITEMSPROPERTIESKINDFromValue returns a pointer to a valid ENUMPROPERTIESDATAITEMSPROPERTIESKIND +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMPROPERTIESDATAITEMSPROPERTIESKINDFromValue(v string) (*ENUMPROPERTIESDATAITEMSPROPERTIESKIND, error) { + ev := ENUMPROPERTIESDATAITEMSPROPERTIESKIND(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMPROPERTIESDATAITEMSPROPERTIESKIND: valid values are %v", v, AllowedENUMPROPERTIESDATAITEMSPROPERTIESKINDEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMPROPERTIESDATAITEMSPROPERTIESKIND) IsValid() bool { + for _, existing := range AllowedENUMPROPERTIESDATAITEMSPROPERTIESKINDEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_PROPERTIES_DATA_ITEMS_PROPERTIES_KIND value +func (v ENUMPROPERTIESDATAITEMSPROPERTIESKIND) Ptr() *ENUMPROPERTIESDATAITEMSPROPERTIESKIND { + return &v +} + +type NullableENUMPROPERTIESDATAITEMSPROPERTIESKIND struct { + value *ENUMPROPERTIESDATAITEMSPROPERTIESKIND + isSet bool +} + +func (v NullableENUMPROPERTIESDATAITEMSPROPERTIESKIND) Get() *ENUMPROPERTIESDATAITEMSPROPERTIESKIND { + return v.value +} + +func (v *NullableENUMPROPERTIESDATAITEMSPROPERTIESKIND) Set(val *ENUMPROPERTIESDATAITEMSPROPERTIESKIND) { + v.value = val + v.isSet = true +} + +func (v NullableENUMPROPERTIESDATAITEMSPROPERTIESKIND) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMPROPERTIESDATAITEMSPROPERTIESKIND) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMPROPERTIESDATAITEMSPROPERTIESKIND(val *ENUMPROPERTIESDATAITEMSPROPERTIESKIND) *NullableENUMPROPERTIESDATAITEMSPROPERTIESKIND { + return &NullableENUMPROPERTIESDATAITEMSPROPERTIESKIND{value: val, isSet: true} +} + +func (v NullableENUMPROPERTIESDATAITEMSPROPERTIESKIND) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMPROPERTIESDATAITEMSPROPERTIESKIND) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_properties_filters_items_1_properties_filter_properties_scannerkinds_items.go b/pkg/api/v3/model_enum_properties_filters_items_1_properties_filter_properties_scannerkinds_items.go new file mode 100644 index 00000000..c0c2a750 --- /dev/null +++ b/pkg/api/v3/model_enum_properties_filters_items_1_properties_filter_properties_scannerkinds_items.go @@ -0,0 +1,169 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS the model 'ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS' +type ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS string + +// List of ENUM_PROPERTIES_FILTERS_ITEMS_1_PROPERTIES_FILTER_PROPERTIES_SCANNERKINDS_ITEMS +const ( + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_AKAMAI_ACCOUNT ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_AKAMAI_ACCOUNT" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_AWS_ACCOUNT ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_AWS_ACCOUNT" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_AZURE_TENANT ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_AZURE_TENANT" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_BURPSUITE_EXPORT ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_BURPSUITE_EXPORT" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_CLOUDFLARE_ACCOUNT ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_CLOUDFLARE_ACCOUNT" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_DNS ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_DNS" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_GCP_PROJECT ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_GCP_PROJECT" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_GITHUB_ORGANIZATION ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_GITHUB_ORGANIZATION" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_GITHUB_REPOSITORY ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_GITHUB_REPOSITORY" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_GITLAB_GROUP ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_GITLAB_GROUP" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_GITLAB_REPOSITORY ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_GITLAB_REPOSITORY" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_GRAPHQL ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_GRAPHQL" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_GRAPHQL_SCHEMA ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_GRAPHQL_SCHEMA" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_GRPC ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_GRPC" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_HAR_EXPORT ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_HAR_EXPORT" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_INSOMNIA ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_INSOMNIA" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_IPV4 ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_IPV4" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_IPV6 ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_IPV6" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_KUBERNETES_CLUSTER ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_KUBERNETES_CLUSTER" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_MCP ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_MCP" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_OPENAPI ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_OPENAPI" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_POSTMAN_COLLECTION ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_POSTMAN_COLLECTION" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_POSTMAN_ORGANIZATION ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_POSTMAN_ORGANIZATION" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_REST ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_REST" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_WEBAPP ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_WEBAPP" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_WEBSOCKET ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_WEBSOCKET" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_WIZ_ACCOUNT ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_WIZ_ACCOUNT" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_ASM_WP_JSON ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "ASM_WP_JSON" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_BLST_GRAPHQL ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "BLST_GRAPHQL" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_BLST_REST ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "BLST_REST" + ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS_FRONTEND_DAST ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS = "FRONTEND_DAST" +) + +// All allowed values of ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS enum +var AllowedENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMSEnumValues = []ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS{ + "ASM_AKAMAI_ACCOUNT", + "ASM_AWS_ACCOUNT", + "ASM_AZURE_TENANT", + "ASM_BURPSUITE_EXPORT", + "ASM_CLOUDFLARE_ACCOUNT", + "ASM_DNS", + "ASM_GCP_PROJECT", + "ASM_GITHUB_ORGANIZATION", + "ASM_GITHUB_REPOSITORY", + "ASM_GITLAB_GROUP", + "ASM_GITLAB_REPOSITORY", + "ASM_GRAPHQL", + "ASM_GRAPHQL_SCHEMA", + "ASM_GRPC", + "ASM_HAR_EXPORT", + "ASM_INSOMNIA", + "ASM_IPV4", + "ASM_IPV6", + "ASM_KUBERNETES_CLUSTER", + "ASM_MCP", + "ASM_OPENAPI", + "ASM_POSTMAN_COLLECTION", + "ASM_POSTMAN_ORGANIZATION", + "ASM_REST", + "ASM_WEBAPP", + "ASM_WEBSOCKET", + "ASM_WIZ_ACCOUNT", + "ASM_WP_JSON", + "BLST_GRAPHQL", + "BLST_REST", + "FRONTEND_DAST", +} + +func (v *ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS(value) + for _, existing := range AllowedENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMSEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS", value) +} + +// NewENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMSFromValue returns a pointer to a valid ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMSFromValue(v string) (*ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS, error) { + ev := ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS: valid values are %v", v, AllowedENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMSEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS) IsValid() bool { + for _, existing := range AllowedENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMSEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_PROPERTIES_FILTERS_ITEMS_1_PROPERTIES_FILTER_PROPERTIES_SCANNERKINDS_ITEMS value +func (v ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS) Ptr() *ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS { + return &v +} + +type NullableENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS struct { + value *ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS + isSet bool +} + +func (v NullableENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS) Get() *ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS { + return v.value +} + +func (v *NullableENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS) Set(val *ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS) { + v.value = val + v.isSet = true +} + +func (v NullableENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS(val *ENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS) *NullableENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS { + return &NullableENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS{value: val, isSet: true} +} + +func (v NullableENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMPROPERTIESFILTERSITEMS1PROPERTIESFILTERPROPERTIESSCANNERKINDSITEMS) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_properties_filters_items_2_properties_filter_properties_lastscanstatuses_items.go b/pkg/api/v3/model_enum_properties_filters_items_2_properties_filter_properties_lastscanstatuses_items.go new file mode 100644 index 00000000..cc229bde --- /dev/null +++ b/pkg/api/v3/model_enum_properties_filters_items_2_properties_filter_properties_lastscanstatuses_items.go @@ -0,0 +1,117 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS the model 'ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS' +type ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS string + +// List of ENUM_PROPERTIES_FILTERS_ITEMS_2_PROPERTIES_FILTER_PROPERTIES_LASTSCANSTATUSES_ITEMS +const ( + ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS_CANCELED ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS = "CANCELED" + ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS_FAILED ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS = "FAILED" + ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS_FINISHED ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS = "FINISHED" + ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS_RUNNING ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS = "RUNNING" + ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS_STARTING ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS = "STARTING" +) + +// All allowed values of ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS enum +var AllowedENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMSEnumValues = []ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS{ + "CANCELED", + "FAILED", + "FINISHED", + "RUNNING", + "STARTING", +} + +func (v *ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS(value) + for _, existing := range AllowedENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMSEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS", value) +} + +// NewENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMSFromValue returns a pointer to a valid ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMSFromValue(v string) (*ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS, error) { + ev := ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS: valid values are %v", v, AllowedENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMSEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS) IsValid() bool { + for _, existing := range AllowedENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMSEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_PROPERTIES_FILTERS_ITEMS_2_PROPERTIES_FILTER_PROPERTIES_LASTSCANSTATUSES_ITEMS value +func (v ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS) Ptr() *ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS { + return &v +} + +type NullableENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS struct { + value *ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS + isSet bool +} + +func (v NullableENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS) Get() *ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS { + return v.value +} + +func (v *NullableENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS) Set(val *ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS) { + v.value = val + v.isSet = true +} + +func (v NullableENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS(val *ENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS) *NullableENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS { + return &NullableENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS{value: val, isSet: true} +} + +func (v NullableENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMPROPERTIESFILTERSITEMS2PROPERTIESFILTERPROPERTIESLASTSCANSTATUSESITEMS) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_properties_filters_items_properties_type.go b/pkg/api/v3/model_enum_properties_filters_items_properties_type.go new file mode 100644 index 00000000..81c38cdd --- /dev/null +++ b/pkg/api/v3/model_enum_properties_filters_items_properties_type.go @@ -0,0 +1,119 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE the model 'ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE' +type ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE string + +// List of ENUM_PROPERTIES_FILTERS_ITEMS_PROPERTIES_TYPE +const ( + ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE_ASSETS ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE = "ASSETS" + ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE_EVENTS ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE = "EVENTS" + ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE_ISSUES ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE = "ISSUES" + ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE_LOCATIONS ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE = "LOCATIONS" + ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE_PROFILES ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE = "PROFILES" + ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE_SCANS ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE = "SCANS" +) + +// All allowed values of ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE enum +var AllowedENUMPROPERTIESFILTERSITEMSPROPERTIESTYPEEnumValues = []ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE{ + "ASSETS", + "EVENTS", + "ISSUES", + "LOCATIONS", + "PROFILES", + "SCANS", +} + +func (v *ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE(value) + for _, existing := range AllowedENUMPROPERTIESFILTERSITEMSPROPERTIESTYPEEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE", value) +} + +// NewENUMPROPERTIESFILTERSITEMSPROPERTIESTYPEFromValue returns a pointer to a valid ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMPROPERTIESFILTERSITEMSPROPERTIESTYPEFromValue(v string) (*ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE, error) { + ev := ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE: valid values are %v", v, AllowedENUMPROPERTIESFILTERSITEMSPROPERTIESTYPEEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE) IsValid() bool { + for _, existing := range AllowedENUMPROPERTIESFILTERSITEMSPROPERTIESTYPEEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_PROPERTIES_FILTERS_ITEMS_PROPERTIES_TYPE value +func (v ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE) Ptr() *ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE { + return &v +} + +type NullableENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE struct { + value *ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE + isSet bool +} + +func (v NullableENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE) Get() *ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE { + return v.value +} + +func (v *NullableENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE) Set(val *ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE) { + v.value = val + v.isSet = true +} + +func (v NullableENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE(val *ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE) *NullableENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE { + return &NullableENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE{value: val, isSet: true} +} + +func (v NullableENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_properties_parameters_properties_auth_method.go b/pkg/api/v3/model_enum_properties_parameters_properties_auth_method.go new file mode 100644 index 00000000..b9e10c24 --- /dev/null +++ b/pkg/api/v3/model_enum_properties_parameters_properties_auth_method.go @@ -0,0 +1,111 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD the model 'ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD' +type ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD string + +// List of ENUM_PROPERTIES_PARAMETERS_PROPERTIES_AUTH_METHOD +const ( + ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD_CLOUD ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD = "cloud" + ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD_SERVER ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD = "server" +) + +// All allowed values of ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD enum +var AllowedENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHODEnumValues = []ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD{ + "cloud", + "server", +} + +func (v *ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD(value) + for _, existing := range AllowedENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHODEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD", value) +} + +// NewENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHODFromValue returns a pointer to a valid ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHODFromValue(v string) (*ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD, error) { + ev := ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD: valid values are %v", v, AllowedENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHODEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD) IsValid() bool { + for _, existing := range AllowedENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHODEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_PROPERTIES_PARAMETERS_PROPERTIES_AUTH_METHOD value +func (v ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD) Ptr() *ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD { + return &v +} + +type NullableENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD struct { + value *ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD + isSet bool +} + +func (v NullableENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD) Get() *ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD { + return v.value +} + +func (v *NullableENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD) Set(val *ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD) { + v.value = val + v.isSet = true +} + +func (v NullableENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD(val *ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD) *NullableENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD { + return &NullableENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD{value: val, isSet: true} +} + +func (v NullableENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_properties_parameters_properties_templates_items_properties_properties_mapping_items_properties_mapping_items_properties_escape_property.go b/pkg/api/v3/model_enum_properties_parameters_properties_templates_items_properties_properties_mapping_items_properties_mapping_items_properties_escape_property.go new file mode 100644 index 00000000..3a384951 --- /dev/null +++ b/pkg/api/v3/model_enum_properties_parameters_properties_templates_items_properties_properties_mapping_items_properties_mapping_items_properties_escape_property.go @@ -0,0 +1,119 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY the model 'ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY' +type ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY string + +// List of ENUM_PROPERTIES_PARAMETERS_PROPERTIES_TEMPLATES_ITEMS_PROPERTIES_PROPERTIES_MAPPING_ITEMS_PROPERTIES_MAPPING_ITEMS_PROPERTIES_ESCAPE_PROPERTY +const ( + ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY_APPLICATION_NAME ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY = "applicationName" + ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY_CONTEXT ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY = "context" + ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY_LINK_TO_ESCAPE ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY = "linkToEscape" + ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY_SCAN_ID ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY = "scanId" + ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY_SEVERITY ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY = "severity" + ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY_TEST_CATEGORY ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY = "testCategory" +) + +// All allowed values of ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY enum +var AllowedENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTYEnumValues = []ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY{ + "applicationName", + "context", + "linkToEscape", + "scanId", + "severity", + "testCategory", +} + +func (v *ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY(value) + for _, existing := range AllowedENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTYEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY", value) +} + +// NewENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTYFromValue returns a pointer to a valid ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTYFromValue(v string) (*ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY, error) { + ev := ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY: valid values are %v", v, AllowedENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTYEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY) IsValid() bool { + for _, existing := range AllowedENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTYEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_PROPERTIES_PARAMETERS_PROPERTIES_TEMPLATES_ITEMS_PROPERTIES_PROPERTIES_MAPPING_ITEMS_PROPERTIES_MAPPING_ITEMS_PROPERTIES_ESCAPE_PROPERTY value +func (v ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY) Ptr() *ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY { + return &v +} + +type NullableENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY struct { + value *ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY + isSet bool +} + +func (v NullableENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY) Get() *ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY { + return v.value +} + +func (v *NullableENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY) Set(val *ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY) { + v.value = val + v.isSet = true +} + +func (v NullableENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY(val *ENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY) *NullableENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY { + return &NullableENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY{value: val, isSet: true} +} + +func (v NullableENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMPROPERTIESPARAMETERSPROPERTIESTEMPLATESITEMSPROPERTIESPROPERTIESMAPPINGITEMSPROPERTIESMAPPINGITEMSPROPERTIESESCAPEPROPERTY) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_properties_parameters_properties_upload_severity_levels_items.go b/pkg/api/v3/model_enum_properties_parameters_properties_upload_severity_levels_items.go new file mode 100644 index 00000000..57f08b92 --- /dev/null +++ b/pkg/api/v3/model_enum_properties_parameters_properties_upload_severity_levels_items.go @@ -0,0 +1,117 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS the model 'ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS' +type ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS string + +// List of ENUM_PROPERTIES_PARAMETERS_PROPERTIES_UPLOAD_SEVERITY_LEVELS_ITEMS +const ( + ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS_CRITICAL ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS = "Critical" + ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS_HIGH ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS = "High" + ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS_LOW ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS = "Low" + ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS_MEDIUM ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS = "Medium" + ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS_NONE ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS = "None" +) + +// All allowed values of ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS enum +var AllowedENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMSEnumValues = []ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS{ + "Critical", + "High", + "Low", + "Medium", + "None", +} + +func (v *ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS(value) + for _, existing := range AllowedENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMSEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS", value) +} + +// NewENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMSFromValue returns a pointer to a valid ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMSFromValue(v string) (*ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS, error) { + ev := ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS: valid values are %v", v, AllowedENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMSEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS) IsValid() bool { + for _, existing := range AllowedENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMSEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_PROPERTIES_PARAMETERS_PROPERTIES_UPLOAD_SEVERITY_LEVELS_ITEMS value +func (v ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS) Ptr() *ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS { + return &v +} + +type NullableENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS struct { + value *ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS + isSet bool +} + +func (v NullableENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS) Get() *ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS { + return v.value +} + +func (v *NullableENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS) Set(val *ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS) { + v.value = val + v.isSet = true +} + +func (v NullableENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS(val *ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS) *NullableENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS { + return &NullableENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS{value: val, isSet: true} +} + +func (v NullableENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_properties_trigger.go b/pkg/api/v3/model_enum_properties_trigger.go new file mode 100644 index 00000000..1d50d49a --- /dev/null +++ b/pkg/api/v3/model_enum_properties_trigger.go @@ -0,0 +1,119 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMPROPERTIESTRIGGER the model 'ENUMPROPERTIESTRIGGER' +type ENUMPROPERTIESTRIGGER string + +// List of ENUM_PROPERTIES_TRIGGER +const ( + ENUMPROPERTIESTRIGGER_ASSET_FOUND ENUMPROPERTIESTRIGGER = "ASSET_FOUND" + ENUMPROPERTIESTRIGGER_LOCATION_DOWN ENUMPROPERTIESTRIGGER = "LOCATION_DOWN" + ENUMPROPERTIESTRIGGER_NEW_ISSUE ENUMPROPERTIESTRIGGER = "NEW_ISSUE" + ENUMPROPERTIESTRIGGER_SCAN_COMPLETED ENUMPROPERTIESTRIGGER = "SCAN_COMPLETED" + ENUMPROPERTIESTRIGGER_SCAN_FAILED ENUMPROPERTIESTRIGGER = "SCAN_FAILED" + ENUMPROPERTIESTRIGGER_SCAN_STARTED ENUMPROPERTIESTRIGGER = "SCAN_STARTED" +) + +// All allowed values of ENUMPROPERTIESTRIGGER enum +var AllowedENUMPROPERTIESTRIGGEREnumValues = []ENUMPROPERTIESTRIGGER{ + "ASSET_FOUND", + "LOCATION_DOWN", + "NEW_ISSUE", + "SCAN_COMPLETED", + "SCAN_FAILED", + "SCAN_STARTED", +} + +func (v *ENUMPROPERTIESTRIGGER) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMPROPERTIESTRIGGER(value) + for _, existing := range AllowedENUMPROPERTIESTRIGGEREnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMPROPERTIESTRIGGER", value) +} + +// NewENUMPROPERTIESTRIGGERFromValue returns a pointer to a valid ENUMPROPERTIESTRIGGER +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMPROPERTIESTRIGGERFromValue(v string) (*ENUMPROPERTIESTRIGGER, error) { + ev := ENUMPROPERTIESTRIGGER(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMPROPERTIESTRIGGER: valid values are %v", v, AllowedENUMPROPERTIESTRIGGEREnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMPROPERTIESTRIGGER) IsValid() bool { + for _, existing := range AllowedENUMPROPERTIESTRIGGEREnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_PROPERTIES_TRIGGER value +func (v ENUMPROPERTIESTRIGGER) Ptr() *ENUMPROPERTIESTRIGGER { + return &v +} + +type NullableENUMPROPERTIESTRIGGER struct { + value *ENUMPROPERTIESTRIGGER + isSet bool +} + +func (v NullableENUMPROPERTIESTRIGGER) Get() *ENUMPROPERTIESTRIGGER { + return v.value +} + +func (v *NullableENUMPROPERTIESTRIGGER) Set(val *ENUMPROPERTIESTRIGGER) { + v.value = val + v.isSet = true +} + +func (v NullableENUMPROPERTIESTRIGGER) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMPROPERTIESTRIGGER) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMPROPERTIESTRIGGER(val *ENUMPROPERTIESTRIGGER) *NullableENUMPROPERTIESTRIGGER { + return &NullableENUMPROPERTIESTRIGGER{value: val, isSet: true} +} + +func (v NullableENUMPROPERTIESTRIGGER) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMPROPERTIESTRIGGER) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_properties_visibility.go b/pkg/api/v3/model_enum_properties_visibility.go index 26390581..92daac38 100644 --- a/pkg/api/v3/model_enum_properties_visibility.go +++ b/pkg/api/v3/model_enum_properties_visibility.go @@ -20,15 +20,15 @@ type ENUMPROPERTIESVISIBILITY string // List of ENUM_PROPERTIES_VISIBILITY const ( - ENUMPROPERTIESVISIBILITY_PRIVATE ENUMPROPERTIESVISIBILITY = "PRIVATE" ENUMPROPERTIESVISIBILITY_INTERNAL ENUMPROPERTIESVISIBILITY = "INTERNAL" + ENUMPROPERTIESVISIBILITY_PRIVATE ENUMPROPERTIESVISIBILITY = "PRIVATE" ENUMPROPERTIESVISIBILITY_PUBLIC ENUMPROPERTIESVISIBILITY = "PUBLIC" ) // All allowed values of ENUMPROPERTIESVISIBILITY enum var AllowedENUMPROPERTIESVISIBILITYEnumValues = []ENUMPROPERTIESVISIBILITY{ - "PRIVATE", "INTERNAL", + "PRIVATE", "PUBLIC", } diff --git a/pkg/api/v3/model_enum_roles.go b/pkg/api/v3/model_enum_roles.go new file mode 100644 index 00000000..56be3978 --- /dev/null +++ b/pkg/api/v3/model_enum_roles.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMROLES the model 'ENUMROLES' +type ENUMROLES string + +// List of ENUM_ROLES +const ( + ENUMROLES_ROLES ENUMROLES = "roles" +) + +// All allowed values of ENUMROLES enum +var AllowedENUMROLESEnumValues = []ENUMROLES{ + "roles", +} + +func (v *ENUMROLES) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMROLES(value) + for _, existing := range AllowedENUMROLESEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMROLES", value) +} + +// NewENUMROLESFromValue returns a pointer to a valid ENUMROLES +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMROLESFromValue(v string) (*ENUMROLES, error) { + ev := ENUMROLES(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMROLES: valid values are %v", v, AllowedENUMROLESEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMROLES) IsValid() bool { + for _, existing := range AllowedENUMROLESEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_ROLES value +func (v ENUMROLES) Ptr() *ENUMROLES { + return &v +} + +type NullableENUMROLES struct { + value *ENUMROLES + isSet bool +} + +func (v NullableENUMROLES) Get() *ENUMROLES { + return v.value +} + +func (v *NullableENUMROLES) Set(val *ENUMROLES) { + v.value = val + v.isSet = true +} + +func (v NullableENUMROLES) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMROLES) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMROLES(val *ENUMROLES) *NullableENUMROLES { + return &NullableENUMROLES{value: val, isSet: true} +} + +func (v NullableENUMROLES) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMROLES) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_slack_webhook.go b/pkg/api/v3/model_enum_slack_webhook.go new file mode 100644 index 00000000..9fae2bd9 --- /dev/null +++ b/pkg/api/v3/model_enum_slack_webhook.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMSLACKWEBHOOK the model 'ENUMSLACKWEBHOOK' +type ENUMSLACKWEBHOOK string + +// List of ENUM_SLACK_WEBHOOK +const ( + ENUMSLACKWEBHOOK_SLACK_WEBHOOK ENUMSLACKWEBHOOK = "SLACK_WEBHOOK" +) + +// All allowed values of ENUMSLACKWEBHOOK enum +var AllowedENUMSLACKWEBHOOKEnumValues = []ENUMSLACKWEBHOOK{ + "SLACK_WEBHOOK", +} + +func (v *ENUMSLACKWEBHOOK) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMSLACKWEBHOOK(value) + for _, existing := range AllowedENUMSLACKWEBHOOKEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMSLACKWEBHOOK", value) +} + +// NewENUMSLACKWEBHOOKFromValue returns a pointer to a valid ENUMSLACKWEBHOOK +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMSLACKWEBHOOKFromValue(v string) (*ENUMSLACKWEBHOOK, error) { + ev := ENUMSLACKWEBHOOK(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMSLACKWEBHOOK: valid values are %v", v, AllowedENUMSLACKWEBHOOKEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMSLACKWEBHOOK) IsValid() bool { + for _, existing := range AllowedENUMSLACKWEBHOOKEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_SLACK_WEBHOOK value +func (v ENUMSLACKWEBHOOK) Ptr() *ENUMSLACKWEBHOOK { + return &v +} + +type NullableENUMSLACKWEBHOOK struct { + value *ENUMSLACKWEBHOOK + isSet bool +} + +func (v NullableENUMSLACKWEBHOOK) Get() *ENUMSLACKWEBHOOK { + return v.value +} + +func (v *NullableENUMSLACKWEBHOOK) Set(val *ENUMSLACKWEBHOOK) { + v.value = val + v.isSet = true +} + +func (v NullableENUMSLACKWEBHOOK) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMSLACKWEBHOOK) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMSLACKWEBHOOK(val *ENUMSLACKWEBHOOK) *NullableENUMSLACKWEBHOOK { + return &NullableENUMSLACKWEBHOOK{value: val, isSet: true} +} + +func (v NullableENUMSLACKWEBHOOK) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMSLACKWEBHOOK) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_teams_webhook.go b/pkg/api/v3/model_enum_teams_webhook.go new file mode 100644 index 00000000..04df2775 --- /dev/null +++ b/pkg/api/v3/model_enum_teams_webhook.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMTEAMSWEBHOOK the model 'ENUMTEAMSWEBHOOK' +type ENUMTEAMSWEBHOOK string + +// List of ENUM_TEAMS_WEBHOOK +const ( + ENUMTEAMSWEBHOOK_TEAMS_WEBHOOK ENUMTEAMSWEBHOOK = "TEAMS_WEBHOOK" +) + +// All allowed values of ENUMTEAMSWEBHOOK enum +var AllowedENUMTEAMSWEBHOOKEnumValues = []ENUMTEAMSWEBHOOK{ + "TEAMS_WEBHOOK", +} + +func (v *ENUMTEAMSWEBHOOK) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMTEAMSWEBHOOK(value) + for _, existing := range AllowedENUMTEAMSWEBHOOKEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMTEAMSWEBHOOK", value) +} + +// NewENUMTEAMSWEBHOOKFromValue returns a pointer to a valid ENUMTEAMSWEBHOOK +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMTEAMSWEBHOOKFromValue(v string) (*ENUMTEAMSWEBHOOK, error) { + ev := ENUMTEAMSWEBHOOK(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMTEAMSWEBHOOK: valid values are %v", v, AllowedENUMTEAMSWEBHOOKEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMTEAMSWEBHOOK) IsValid() bool { + for _, existing := range AllowedENUMTEAMSWEBHOOKEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_TEAMS_WEBHOOK value +func (v ENUMTEAMSWEBHOOK) Ptr() *ENUMTEAMSWEBHOOK { + return &v +} + +type NullableENUMTEAMSWEBHOOK struct { + value *ENUMTEAMSWEBHOOK + isSet bool +} + +func (v NullableENUMTEAMSWEBHOOK) Get() *ENUMTEAMSWEBHOOK { + return v.value +} + +func (v *NullableENUMTEAMSWEBHOOK) Set(val *ENUMTEAMSWEBHOOK) { + v.value = val + v.isSet = true +} + +func (v NullableENUMTEAMSWEBHOOK) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMTEAMSWEBHOOK) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMTEAMSWEBHOOK(val *ENUMTEAMSWEBHOOK) *NullableENUMTEAMSWEBHOOK { + return &NullableENUMTEAMSWEBHOOK{value: val, isSet: true} +} + +func (v NullableENUMTEAMSWEBHOOK) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMTEAMSWEBHOOK) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_webhook.go b/pkg/api/v3/model_enum_webhook.go new file mode 100644 index 00000000..4467cd97 --- /dev/null +++ b/pkg/api/v3/model_enum_webhook.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMWEBHOOK the model 'ENUMWEBHOOK' +type ENUMWEBHOOK string + +// List of ENUM_WEBHOOK +const ( + ENUMWEBHOOK_WEBHOOK ENUMWEBHOOK = "WEBHOOK" +) + +// All allowed values of ENUMWEBHOOK enum +var AllowedENUMWEBHOOKEnumValues = []ENUMWEBHOOK{ + "WEBHOOK", +} + +func (v *ENUMWEBHOOK) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMWEBHOOK(value) + for _, existing := range AllowedENUMWEBHOOKEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMWEBHOOK", value) +} + +// NewENUMWEBHOOKFromValue returns a pointer to a valid ENUMWEBHOOK +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMWEBHOOKFromValue(v string) (*ENUMWEBHOOK, error) { + ev := ENUMWEBHOOK(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMWEBHOOK: valid values are %v", v, AllowedENUMWEBHOOKEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMWEBHOOK) IsValid() bool { + for _, existing := range AllowedENUMWEBHOOKEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_WEBHOOK value +func (v ENUMWEBHOOK) Ptr() *ENUMWEBHOOK { + return &v +} + +type NullableENUMWEBHOOK struct { + value *ENUMWEBHOOK + isSet bool +} + +func (v NullableENUMWEBHOOK) Get() *ENUMWEBHOOK { + return v.value +} + +func (v *NullableENUMWEBHOOK) Set(val *ENUMWEBHOOK) { + v.value = val + v.isSet = true +} + +func (v NullableENUMWEBHOOK) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMWEBHOOK) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMWEBHOOK(val *ENUMWEBHOOK) *NullableENUMWEBHOOK { + return &NullableENUMWEBHOOK{value: val, isSet: true} +} + +func (v NullableENUMWEBHOOK) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMWEBHOOK) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_enum_wiz.go b/pkg/api/v3/model_enum_wiz.go new file mode 100644 index 00000000..12a23838 --- /dev/null +++ b/pkg/api/v3/model_enum_wiz.go @@ -0,0 +1,109 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// ENUMWIZ the model 'ENUMWIZ' +type ENUMWIZ string + +// List of ENUM_WIZ +const ( + ENUMWIZ_WIZ ENUMWIZ = "WIZ" +) + +// All allowed values of ENUMWIZ enum +var AllowedENUMWIZEnumValues = []ENUMWIZ{ + "WIZ", +} + +func (v *ENUMWIZ) UnmarshalJSON(src []byte) error { + var value string + err := json.Unmarshal(src, &value) + if err != nil { + return err + } + enumTypeValue := ENUMWIZ(value) + for _, existing := range AllowedENUMWIZEnumValues { + if existing == enumTypeValue { + *v = enumTypeValue + return nil + } + } + + return fmt.Errorf("%+v is not a valid ENUMWIZ", value) +} + +// NewENUMWIZFromValue returns a pointer to a valid ENUMWIZ +// for the value passed as argument, or an error if the value passed is not allowed by the enum +func NewENUMWIZFromValue(v string) (*ENUMWIZ, error) { + ev := ENUMWIZ(v) + if ev.IsValid() { + return &ev, nil + } else { + return nil, fmt.Errorf("invalid value '%v' for ENUMWIZ: valid values are %v", v, AllowedENUMWIZEnumValues) + } +} + +// IsValid return true if the value is valid for the enum, false otherwise +func (v ENUMWIZ) IsValid() bool { + for _, existing := range AllowedENUMWIZEnumValues { + if existing == v { + return true + } + } + return false +} + +// Ptr returns reference to ENUM_WIZ value +func (v ENUMWIZ) Ptr() *ENUMWIZ { + return &v +} + +type NullableENUMWIZ struct { + value *ENUMWIZ + isSet bool +} + +func (v NullableENUMWIZ) Get() *ENUMWIZ { + return v.value +} + +func (v *NullableENUMWIZ) Set(val *ENUMWIZ) { + v.value = val + v.isSet = true +} + +func (v NullableENUMWIZ) IsSet() bool { + return v.isSet +} + +func (v *NullableENUMWIZ) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableENUMWIZ(val *ENUMWIZ) *NullableENUMWIZ { + return &NullableENUMWIZ{value: val, isSet: true} +} + +func (v NullableENUMWIZ) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableENUMWIZ) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + diff --git a/pkg/api/v3/model_listakamai_integrations_200_response.go b/pkg/api/v3/model_listakamai_integrations_200_response.go new file mode 100644 index 00000000..e4a91654 --- /dev/null +++ b/pkg/api/v3/model_listakamai_integrations_200_response.go @@ -0,0 +1,246 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the ListakamaiIntegrations200Response type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListakamaiIntegrations200Response{} + +// ListakamaiIntegrations200Response struct for ListakamaiIntegrations200Response +type ListakamaiIntegrations200Response struct { + NextCursor *string `json:"nextCursor,omitempty"` + TotalCount *int `json:"totalCount,omitempty"` + Data []ListakamaiIntegrations200ResponseDataInner `json:"data"` + AdditionalProperties map[string]interface{} +} + +type _ListakamaiIntegrations200Response ListakamaiIntegrations200Response + +// NewListakamaiIntegrations200Response instantiates a new ListakamaiIntegrations200Response object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListakamaiIntegrations200Response(data []ListakamaiIntegrations200ResponseDataInner) *ListakamaiIntegrations200Response { + this := ListakamaiIntegrations200Response{} + var totalCount int = 100 + this.TotalCount = &totalCount + this.Data = data + return &this +} + +// NewListakamaiIntegrations200ResponseWithDefaults instantiates a new ListakamaiIntegrations200Response object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListakamaiIntegrations200ResponseWithDefaults() *ListakamaiIntegrations200Response { + this := ListakamaiIntegrations200Response{} + var totalCount int = 100 + this.TotalCount = &totalCount + return &this +} + +// GetNextCursor returns the NextCursor field value if set, zero value otherwise. +func (o *ListakamaiIntegrations200Response) GetNextCursor() string { + if o == nil || IsNil(o.NextCursor) { + var ret string + return ret + } + return *o.NextCursor +} + +// GetNextCursorOk returns a tuple with the NextCursor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListakamaiIntegrations200Response) GetNextCursorOk() (*string, bool) { + if o == nil || IsNil(o.NextCursor) { + return nil, false + } + return o.NextCursor, true +} + +// HasNextCursor returns a boolean if a field has been set. +func (o *ListakamaiIntegrations200Response) HasNextCursor() bool { + if o != nil && !IsNil(o.NextCursor) { + return true + } + + return false +} + +// SetNextCursor gets a reference to the given string and assigns it to the NextCursor field. +func (o *ListakamaiIntegrations200Response) SetNextCursor(v string) { + o.NextCursor = &v +} + +// GetTotalCount returns the TotalCount field value if set, zero value otherwise. +func (o *ListakamaiIntegrations200Response) GetTotalCount() int { + if o == nil || IsNil(o.TotalCount) { + var ret int + return ret + } + return *o.TotalCount +} + +// GetTotalCountOk returns a tuple with the TotalCount field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListakamaiIntegrations200Response) GetTotalCountOk() (*int, bool) { + if o == nil || IsNil(o.TotalCount) { + return nil, false + } + return o.TotalCount, true +} + +// HasTotalCount returns a boolean if a field has been set. +func (o *ListakamaiIntegrations200Response) HasTotalCount() bool { + if o != nil && !IsNil(o.TotalCount) { + return true + } + + return false +} + +// SetTotalCount gets a reference to the given int and assigns it to the TotalCount field. +func (o *ListakamaiIntegrations200Response) SetTotalCount(v int) { + o.TotalCount = &v +} + +// GetData returns the Data field value +func (o *ListakamaiIntegrations200Response) GetData() []ListakamaiIntegrations200ResponseDataInner { + if o == nil { + var ret []ListakamaiIntegrations200ResponseDataInner + return ret + } + + return o.Data +} + +// GetDataOk returns a tuple with the Data field value +// and a boolean to check if the value has been set. +func (o *ListakamaiIntegrations200Response) GetDataOk() ([]ListakamaiIntegrations200ResponseDataInner, bool) { + if o == nil { + return nil, false + } + return o.Data, true +} + +// SetData sets field value +func (o *ListakamaiIntegrations200Response) SetData(v []ListakamaiIntegrations200ResponseDataInner) { + o.Data = v +} + +func (o ListakamaiIntegrations200Response) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListakamaiIntegrations200Response) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.NextCursor) { + toSerialize["nextCursor"] = o.NextCursor + } + if !IsNil(o.TotalCount) { + toSerialize["totalCount"] = o.TotalCount + } + toSerialize["data"] = o.Data + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListakamaiIntegrations200Response) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "data", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varListakamaiIntegrations200Response := _ListakamaiIntegrations200Response{} + + err = json.Unmarshal(data, &varListakamaiIntegrations200Response) + + if err != nil { + return err + } + + *o = ListakamaiIntegrations200Response(varListakamaiIntegrations200Response) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "nextCursor") + delete(additionalProperties, "totalCount") + delete(additionalProperties, "data") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListakamaiIntegrations200Response struct { + value *ListakamaiIntegrations200Response + isSet bool +} + +func (v NullableListakamaiIntegrations200Response) Get() *ListakamaiIntegrations200Response { + return v.value +} + +func (v *NullableListakamaiIntegrations200Response) Set(val *ListakamaiIntegrations200Response) { + v.value = val + v.isSet = true +} + +func (v NullableListakamaiIntegrations200Response) IsSet() bool { + return v.isSet +} + +func (v *NullableListakamaiIntegrations200Response) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListakamaiIntegrations200Response(val *ListakamaiIntegrations200Response) *NullableListakamaiIntegrations200Response { + return &NullableListakamaiIntegrations200Response{value: val, isSet: true} +} + +func (v NullableListakamaiIntegrations200Response) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListakamaiIntegrations200Response) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_listakamai_integrations_200_response_data_inner.go b/pkg/api/v3/model_listakamai_integrations_200_response_data_inner.go new file mode 100644 index 00000000..dc4dcc57 --- /dev/null +++ b/pkg/api/v3/model_listakamai_integrations_200_response_data_inner.go @@ -0,0 +1,432 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "time" + "fmt" +) + +// checks if the ListakamaiIntegrations200ResponseDataInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &ListakamaiIntegrations200ResponseDataInner{} + +// ListakamaiIntegrations200ResponseDataInner struct for ListakamaiIntegrations200ResponseDataInner +type ListakamaiIntegrations200ResponseDataInner struct { + // The id of the integration + Id string `json:"id"` + // The name of the integration + Name string `json:"name"` + // The date and time the integration was created + CreatedAt time.Time `json:"createdAt"` + // The date and time the integration was last updated + UpdatedAt time.Time `json:"updatedAt"` + // The date and time the integration is scheduled for deletion + ScheduledForDeletionAt *time.Time `json:"scheduledForDeletionAt,omitempty"` + // The date and time the last pull workflow was executed + LastPullWorkflowAt *time.Time `json:"lastPullWorkflowAt,omitempty"` + // The projects of the integration + Projects []ListProjects200ResponseDataInner `json:"projects"` + Location *LocationSummarized1 `json:"location,omitempty"` + Kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND `json:"kind"` + AdditionalProperties map[string]interface{} +} + +type _ListakamaiIntegrations200ResponseDataInner ListakamaiIntegrations200ResponseDataInner + +// NewListakamaiIntegrations200ResponseDataInner instantiates a new ListakamaiIntegrations200ResponseDataInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewListakamaiIntegrations200ResponseDataInner(id string, name string, createdAt time.Time, updatedAt time.Time, projects []ListProjects200ResponseDataInner, kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND) *ListakamaiIntegrations200ResponseDataInner { + this := ListakamaiIntegrations200ResponseDataInner{} + this.Id = id + this.Name = name + this.CreatedAt = createdAt + this.UpdatedAt = updatedAt + this.Projects = projects + this.Kind = kind + return &this +} + +// NewListakamaiIntegrations200ResponseDataInnerWithDefaults instantiates a new ListakamaiIntegrations200ResponseDataInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewListakamaiIntegrations200ResponseDataInnerWithDefaults() *ListakamaiIntegrations200ResponseDataInner { + this := ListakamaiIntegrations200ResponseDataInner{} + return &this +} + +// GetId returns the Id field value +func (o *ListakamaiIntegrations200ResponseDataInner) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *ListakamaiIntegrations200ResponseDataInner) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *ListakamaiIntegrations200ResponseDataInner) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *ListakamaiIntegrations200ResponseDataInner) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *ListakamaiIntegrations200ResponseDataInner) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *ListakamaiIntegrations200ResponseDataInner) SetName(v string) { + o.Name = v +} + +// GetCreatedAt returns the CreatedAt field value +func (o *ListakamaiIntegrations200ResponseDataInner) GetCreatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value +// and a boolean to check if the value has been set. +func (o *ListakamaiIntegrations200ResponseDataInner) GetCreatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.CreatedAt, true +} + +// SetCreatedAt sets field value +func (o *ListakamaiIntegrations200ResponseDataInner) SetCreatedAt(v time.Time) { + o.CreatedAt = v +} + +// GetUpdatedAt returns the UpdatedAt field value +func (o *ListakamaiIntegrations200ResponseDataInner) GetUpdatedAt() time.Time { + if o == nil { + var ret time.Time + return ret + } + + return o.UpdatedAt +} + +// GetUpdatedAtOk returns a tuple with the UpdatedAt field value +// and a boolean to check if the value has been set. +func (o *ListakamaiIntegrations200ResponseDataInner) GetUpdatedAtOk() (*time.Time, bool) { + if o == nil { + return nil, false + } + return &o.UpdatedAt, true +} + +// SetUpdatedAt sets field value +func (o *ListakamaiIntegrations200ResponseDataInner) SetUpdatedAt(v time.Time) { + o.UpdatedAt = v +} + +// GetScheduledForDeletionAt returns the ScheduledForDeletionAt field value if set, zero value otherwise. +func (o *ListakamaiIntegrations200ResponseDataInner) GetScheduledForDeletionAt() time.Time { + if o == nil || IsNil(o.ScheduledForDeletionAt) { + var ret time.Time + return ret + } + return *o.ScheduledForDeletionAt +} + +// GetScheduledForDeletionAtOk returns a tuple with the ScheduledForDeletionAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListakamaiIntegrations200ResponseDataInner) GetScheduledForDeletionAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.ScheduledForDeletionAt) { + return nil, false + } + return o.ScheduledForDeletionAt, true +} + +// HasScheduledForDeletionAt returns a boolean if a field has been set. +func (o *ListakamaiIntegrations200ResponseDataInner) HasScheduledForDeletionAt() bool { + if o != nil && !IsNil(o.ScheduledForDeletionAt) { + return true + } + + return false +} + +// SetScheduledForDeletionAt gets a reference to the given time.Time and assigns it to the ScheduledForDeletionAt field. +func (o *ListakamaiIntegrations200ResponseDataInner) SetScheduledForDeletionAt(v time.Time) { + o.ScheduledForDeletionAt = &v +} + +// GetLastPullWorkflowAt returns the LastPullWorkflowAt field value if set, zero value otherwise. +func (o *ListakamaiIntegrations200ResponseDataInner) GetLastPullWorkflowAt() time.Time { + if o == nil || IsNil(o.LastPullWorkflowAt) { + var ret time.Time + return ret + } + return *o.LastPullWorkflowAt +} + +// GetLastPullWorkflowAtOk returns a tuple with the LastPullWorkflowAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListakamaiIntegrations200ResponseDataInner) GetLastPullWorkflowAtOk() (*time.Time, bool) { + if o == nil || IsNil(o.LastPullWorkflowAt) { + return nil, false + } + return o.LastPullWorkflowAt, true +} + +// HasLastPullWorkflowAt returns a boolean if a field has been set. +func (o *ListakamaiIntegrations200ResponseDataInner) HasLastPullWorkflowAt() bool { + if o != nil && !IsNil(o.LastPullWorkflowAt) { + return true + } + + return false +} + +// SetLastPullWorkflowAt gets a reference to the given time.Time and assigns it to the LastPullWorkflowAt field. +func (o *ListakamaiIntegrations200ResponseDataInner) SetLastPullWorkflowAt(v time.Time) { + o.LastPullWorkflowAt = &v +} + +// GetProjects returns the Projects field value +func (o *ListakamaiIntegrations200ResponseDataInner) GetProjects() []ListProjects200ResponseDataInner { + if o == nil { + var ret []ListProjects200ResponseDataInner + return ret + } + + return o.Projects +} + +// GetProjectsOk returns a tuple with the Projects field value +// and a boolean to check if the value has been set. +func (o *ListakamaiIntegrations200ResponseDataInner) GetProjectsOk() ([]ListProjects200ResponseDataInner, bool) { + if o == nil { + return nil, false + } + return o.Projects, true +} + +// SetProjects sets field value +func (o *ListakamaiIntegrations200ResponseDataInner) SetProjects(v []ListProjects200ResponseDataInner) { + o.Projects = v +} + +// GetLocation returns the Location field value if set, zero value otherwise. +func (o *ListakamaiIntegrations200ResponseDataInner) GetLocation() LocationSummarized1 { + if o == nil || IsNil(o.Location) { + var ret LocationSummarized1 + return ret + } + return *o.Location +} + +// GetLocationOk returns a tuple with the Location field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ListakamaiIntegrations200ResponseDataInner) GetLocationOk() (*LocationSummarized1, bool) { + if o == nil || IsNil(o.Location) { + return nil, false + } + return o.Location, true +} + +// HasLocation returns a boolean if a field has been set. +func (o *ListakamaiIntegrations200ResponseDataInner) HasLocation() bool { + if o != nil && !IsNil(o.Location) { + return true + } + + return false +} + +// SetLocation gets a reference to the given LocationSummarized1 and assigns it to the Location field. +func (o *ListakamaiIntegrations200ResponseDataInner) SetLocation(v LocationSummarized1) { + o.Location = &v +} + +// GetKind returns the Kind field value +func (o *ListakamaiIntegrations200ResponseDataInner) GetKind() ENUMPROPERTIESDATAITEMSPROPERTIESKIND { + if o == nil { + var ret ENUMPROPERTIESDATAITEMSPROPERTIESKIND + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *ListakamaiIntegrations200ResponseDataInner) GetKindOk() (*ENUMPROPERTIESDATAITEMSPROPERTIESKIND, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *ListakamaiIntegrations200ResponseDataInner) SetKind(v ENUMPROPERTIESDATAITEMSPROPERTIESKIND) { + o.Kind = v +} + +func (o ListakamaiIntegrations200ResponseDataInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o ListakamaiIntegrations200ResponseDataInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["createdAt"] = o.CreatedAt + toSerialize["updatedAt"] = o.UpdatedAt + if !IsNil(o.ScheduledForDeletionAt) { + toSerialize["scheduledForDeletionAt"] = o.ScheduledForDeletionAt + } + if !IsNil(o.LastPullWorkflowAt) { + toSerialize["lastPullWorkflowAt"] = o.LastPullWorkflowAt + } + toSerialize["projects"] = o.Projects + if !IsNil(o.Location) { + toSerialize["location"] = o.Location + } + toSerialize["kind"] = o.Kind + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *ListakamaiIntegrations200ResponseDataInner) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "createdAt", + "updatedAt", + "projects", + "kind", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varListakamaiIntegrations200ResponseDataInner := _ListakamaiIntegrations200ResponseDataInner{} + + err = json.Unmarshal(data, &varListakamaiIntegrations200ResponseDataInner) + + if err != nil { + return err + } + + *o = ListakamaiIntegrations200ResponseDataInner(varListakamaiIntegrations200ResponseDataInner) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "createdAt") + delete(additionalProperties, "updatedAt") + delete(additionalProperties, "scheduledForDeletionAt") + delete(additionalProperties, "lastPullWorkflowAt") + delete(additionalProperties, "projects") + delete(additionalProperties, "location") + delete(additionalProperties, "kind") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableListakamaiIntegrations200ResponseDataInner struct { + value *ListakamaiIntegrations200ResponseDataInner + isSet bool +} + +func (v NullableListakamaiIntegrations200ResponseDataInner) Get() *ListakamaiIntegrations200ResponseDataInner { + return v.value +} + +func (v *NullableListakamaiIntegrations200ResponseDataInner) Set(val *ListakamaiIntegrations200ResponseDataInner) { + v.value = val + v.isSet = true +} + +func (v NullableListakamaiIntegrations200ResponseDataInner) IsSet() bool { + return v.isSet +} + +func (v *NullableListakamaiIntegrations200ResponseDataInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableListakamaiIntegrations200ResponseDataInner(val *ListakamaiIntegrations200ResponseDataInner) *NullableListakamaiIntegrations200ResponseDataInner { + return &NullableListakamaiIntegrations200ResponseDataInner{value: val, isSet: true} +} + +func (v NullableListakamaiIntegrations200ResponseDataInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableListakamaiIntegrations200ResponseDataInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_location_detailed_1.go b/pkg/api/v3/model_location_detailed_1.go new file mode 100644 index 00000000..bd9ef413 --- /dev/null +++ b/pkg/api/v3/model_location_detailed_1.go @@ -0,0 +1,420 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the LocationDetailed1 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LocationDetailed1{} + +// LocationDetailed1 Detailed information about a location +type LocationDetailed1 struct { + // The location ID. + Id *string `json:"id,omitempty"` + // The name of the location. + Name *string `json:"name,omitempty"` + // The type of the location. + Type *string `json:"type,omitempty"` + // Whether the location is enabled. + Enabled *bool `json:"enabled,omitempty"` + // The date and time the location was created. + CreatedAt *string `json:"createdAt,omitempty"` + // The date and time the location was last seen. + LastSeenAt *string `json:"lastSeenAt,omitempty"` + Links LocationSummarizedLinks `json:"links"` + AdditionalProperties map[string]interface{} +} + +type _LocationDetailed1 LocationDetailed1 + +// NewLocationDetailed1 instantiates a new LocationDetailed1 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLocationDetailed1(links LocationSummarizedLinks) *LocationDetailed1 { + this := LocationDetailed1{} + var id string = "00000000-0000-0000-0000-000000000000" + this.Id = &id + var name string = "Location Name" + this.Name = &name + var type_ string = "Location Type" + this.Type = &type_ + var enabled bool = true + this.Enabled = &enabled + var createdAt string = "2021-01-01T00:00:00Z" + this.CreatedAt = &createdAt + var lastSeenAt string = "2021-01-01T00:00:00Z" + this.LastSeenAt = &lastSeenAt + this.Links = links + return &this +} + +// NewLocationDetailed1WithDefaults instantiates a new LocationDetailed1 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLocationDetailed1WithDefaults() *LocationDetailed1 { + this := LocationDetailed1{} + var id string = "00000000-0000-0000-0000-000000000000" + this.Id = &id + var name string = "Location Name" + this.Name = &name + var type_ string = "Location Type" + this.Type = &type_ + var enabled bool = true + this.Enabled = &enabled + var createdAt string = "2021-01-01T00:00:00Z" + this.CreatedAt = &createdAt + var lastSeenAt string = "2021-01-01T00:00:00Z" + this.LastSeenAt = &lastSeenAt + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *LocationDetailed1) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LocationDetailed1) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *LocationDetailed1) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *LocationDetailed1) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *LocationDetailed1) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LocationDetailed1) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *LocationDetailed1) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *LocationDetailed1) SetName(v string) { + o.Name = &v +} + +// GetType returns the Type field value if set, zero value otherwise. +func (o *LocationDetailed1) GetType() string { + if o == nil || IsNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LocationDetailed1) GetTypeOk() (*string, bool) { + if o == nil || IsNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *LocationDetailed1) HasType() bool { + if o != nil && !IsNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *LocationDetailed1) SetType(v string) { + o.Type = &v +} + +// GetEnabled returns the Enabled field value if set, zero value otherwise. +func (o *LocationDetailed1) GetEnabled() bool { + if o == nil || IsNil(o.Enabled) { + var ret bool + return ret + } + return *o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LocationDetailed1) GetEnabledOk() (*bool, bool) { + if o == nil || IsNil(o.Enabled) { + return nil, false + } + return o.Enabled, true +} + +// HasEnabled returns a boolean if a field has been set. +func (o *LocationDetailed1) HasEnabled() bool { + if o != nil && !IsNil(o.Enabled) { + return true + } + + return false +} + +// SetEnabled gets a reference to the given bool and assigns it to the Enabled field. +func (o *LocationDetailed1) SetEnabled(v bool) { + o.Enabled = &v +} + +// GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. +func (o *LocationDetailed1) GetCreatedAt() string { + if o == nil || IsNil(o.CreatedAt) { + var ret string + return ret + } + return *o.CreatedAt +} + +// GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LocationDetailed1) GetCreatedAtOk() (*string, bool) { + if o == nil || IsNil(o.CreatedAt) { + return nil, false + } + return o.CreatedAt, true +} + +// HasCreatedAt returns a boolean if a field has been set. +func (o *LocationDetailed1) HasCreatedAt() bool { + if o != nil && !IsNil(o.CreatedAt) { + return true + } + + return false +} + +// SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. +func (o *LocationDetailed1) SetCreatedAt(v string) { + o.CreatedAt = &v +} + +// GetLastSeenAt returns the LastSeenAt field value if set, zero value otherwise. +func (o *LocationDetailed1) GetLastSeenAt() string { + if o == nil || IsNil(o.LastSeenAt) { + var ret string + return ret + } + return *o.LastSeenAt +} + +// GetLastSeenAtOk returns a tuple with the LastSeenAt field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *LocationDetailed1) GetLastSeenAtOk() (*string, bool) { + if o == nil || IsNil(o.LastSeenAt) { + return nil, false + } + return o.LastSeenAt, true +} + +// HasLastSeenAt returns a boolean if a field has been set. +func (o *LocationDetailed1) HasLastSeenAt() bool { + if o != nil && !IsNil(o.LastSeenAt) { + return true + } + + return false +} + +// SetLastSeenAt gets a reference to the given string and assigns it to the LastSeenAt field. +func (o *LocationDetailed1) SetLastSeenAt(v string) { + o.LastSeenAt = &v +} + +// GetLinks returns the Links field value +func (o *LocationDetailed1) GetLinks() LocationSummarizedLinks { + if o == nil { + var ret LocationSummarizedLinks + return ret + } + + return o.Links +} + +// GetLinksOk returns a tuple with the Links field value +// and a boolean to check if the value has been set. +func (o *LocationDetailed1) GetLinksOk() (*LocationSummarizedLinks, bool) { + if o == nil { + return nil, false + } + return &o.Links, true +} + +// SetLinks sets field value +func (o *LocationDetailed1) SetLinks(v LocationSummarizedLinks) { + o.Links = v +} + +func (o LocationDetailed1) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LocationDetailed1) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Type) { + toSerialize["type"] = o.Type + } + if !IsNil(o.Enabled) { + toSerialize["enabled"] = o.Enabled + } + if !IsNil(o.CreatedAt) { + toSerialize["createdAt"] = o.CreatedAt + } + if !IsNil(o.LastSeenAt) { + toSerialize["lastSeenAt"] = o.LastSeenAt + } + toSerialize["links"] = o.Links + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *LocationDetailed1) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "links", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLocationDetailed1 := _LocationDetailed1{} + + err = json.Unmarshal(data, &varLocationDetailed1) + + if err != nil { + return err + } + + *o = LocationDetailed1(varLocationDetailed1) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "type") + delete(additionalProperties, "enabled") + delete(additionalProperties, "createdAt") + delete(additionalProperties, "lastSeenAt") + delete(additionalProperties, "links") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableLocationDetailed1 struct { + value *LocationDetailed1 + isSet bool +} + +func (v NullableLocationDetailed1) Get() *LocationDetailed1 { + return v.value +} + +func (v *NullableLocationDetailed1) Set(val *LocationDetailed1) { + v.value = val + v.isSet = true +} + +func (v NullableLocationDetailed1) IsSet() bool { + return v.isSet +} + +func (v *NullableLocationDetailed1) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLocationDetailed1(val *LocationDetailed1) *NullableLocationDetailed1 { + return &NullableLocationDetailed1{value: val, isSet: true} +} + +func (v NullableLocationDetailed1) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLocationDetailed1) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_location_summarized_1.go b/pkg/api/v3/model_location_summarized_1.go new file mode 100644 index 00000000..c76725ef --- /dev/null +++ b/pkg/api/v3/model_location_summarized_1.go @@ -0,0 +1,288 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the LocationSummarized1 type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &LocationSummarized1{} + +// LocationSummarized1 Summarized information about a location +type LocationSummarized1 struct { + // The location ID. + Id string `json:"id"` + // The name of the location. + Name string `json:"name"` + // The type of the location. + Type string `json:"type"` + // Whether the location is enabled. + Enabled bool `json:"enabled"` + Links LocationSummarizedLinks `json:"links"` + AdditionalProperties map[string]interface{} +} + +type _LocationSummarized1 LocationSummarized1 + +// NewLocationSummarized1 instantiates a new LocationSummarized1 object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewLocationSummarized1(id string, name string, type_ string, enabled bool, links LocationSummarizedLinks) *LocationSummarized1 { + this := LocationSummarized1{} + this.Id = id + this.Name = name + this.Type = type_ + this.Enabled = enabled + this.Links = links + return &this +} + +// NewLocationSummarized1WithDefaults instantiates a new LocationSummarized1 object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewLocationSummarized1WithDefaults() *LocationSummarized1 { + this := LocationSummarized1{} + return &this +} + +// GetId returns the Id field value +func (o *LocationSummarized1) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *LocationSummarized1) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *LocationSummarized1) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *LocationSummarized1) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *LocationSummarized1) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *LocationSummarized1) SetName(v string) { + o.Name = v +} + +// GetType returns the Type field value +func (o *LocationSummarized1) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *LocationSummarized1) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *LocationSummarized1) SetType(v string) { + o.Type = v +} + +// GetEnabled returns the Enabled field value +func (o *LocationSummarized1) GetEnabled() bool { + if o == nil { + var ret bool + return ret + } + + return o.Enabled +} + +// GetEnabledOk returns a tuple with the Enabled field value +// and a boolean to check if the value has been set. +func (o *LocationSummarized1) GetEnabledOk() (*bool, bool) { + if o == nil { + return nil, false + } + return &o.Enabled, true +} + +// SetEnabled sets field value +func (o *LocationSummarized1) SetEnabled(v bool) { + o.Enabled = v +} + +// GetLinks returns the Links field value +func (o *LocationSummarized1) GetLinks() LocationSummarizedLinks { + if o == nil { + var ret LocationSummarizedLinks + return ret + } + + return o.Links +} + +// GetLinksOk returns a tuple with the Links field value +// and a boolean to check if the value has been set. +func (o *LocationSummarized1) GetLinksOk() (*LocationSummarizedLinks, bool) { + if o == nil { + return nil, false + } + return &o.Links, true +} + +// SetLinks sets field value +func (o *LocationSummarized1) SetLinks(v LocationSummarizedLinks) { + o.Links = v +} + +func (o LocationSummarized1) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o LocationSummarized1) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["type"] = o.Type + toSerialize["enabled"] = o.Enabled + toSerialize["links"] = o.Links + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *LocationSummarized1) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "type", + "enabled", + "links", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varLocationSummarized1 := _LocationSummarized1{} + + err = json.Unmarshal(data, &varLocationSummarized1) + + if err != nil { + return err + } + + *o = LocationSummarized1(varLocationSummarized1) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "type") + delete(additionalProperties, "enabled") + delete(additionalProperties, "links") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableLocationSummarized1 struct { + value *LocationSummarized1 + isSet bool +} + +func (v NullableLocationSummarized1) Get() *LocationSummarized1 { + return v.value +} + +func (v *NullableLocationSummarized1) Set(val *LocationSummarized1) { + v.value = val + v.isSet = true +} + +func (v NullableLocationSummarized1) IsSet() bool { + return v.isSet +} + +func (v *NullableLocationSummarized1) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableLocationSummarized1(val *LocationSummarized1) *NullableLocationSummarized1 { + return &NullableLocationSummarized1{value: val, isSet: true} +} + +func (v NullableLocationSummarized1) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableLocationSummarized1) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_profile_detailed_configuration_authentication_users_inner_credentials_actions_inner_one_of.go b/pkg/api/v3/model_profile_detailed_configuration_authentication_users_inner_credentials_actions_inner_one_of.go index 080840f0..04d6b99b 100644 --- a/pkg/api/v3/model_profile_detailed_configuration_authentication_users_inner_credentials_actions_inner_one_of.go +++ b/pkg/api/v3/model_profile_detailed_configuration_authentication_users_inner_credentials_actions_inner_one_of.go @@ -24,6 +24,7 @@ type ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInner AllowFailure *bool `json:"allow_failure,omitempty"` Locator string `json:"locator"` Timeout *float32 `json:"timeout,omitempty"` + SelectFirstIfMultiple *bool `json:"select_first_if_multiple,omitempty"` AdditionalProperties map[string]interface{} } @@ -160,6 +161,38 @@ func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsI o.Timeout = &v } +// GetSelectFirstIfMultiple returns the SelectFirstIfMultiple field value if set, zero value otherwise. +func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInnerOneOf) GetSelectFirstIfMultiple() bool { + if o == nil || IsNil(o.SelectFirstIfMultiple) { + var ret bool + return ret + } + return *o.SelectFirstIfMultiple +} + +// GetSelectFirstIfMultipleOk returns a tuple with the SelectFirstIfMultiple field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInnerOneOf) GetSelectFirstIfMultipleOk() (*bool, bool) { + if o == nil || IsNil(o.SelectFirstIfMultiple) { + return nil, false + } + return o.SelectFirstIfMultiple, true +} + +// HasSelectFirstIfMultiple returns a boolean if a field has been set. +func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInnerOneOf) HasSelectFirstIfMultiple() bool { + if o != nil && !IsNil(o.SelectFirstIfMultiple) { + return true + } + + return false +} + +// SetSelectFirstIfMultiple gets a reference to the given bool and assigns it to the SelectFirstIfMultiple field. +func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInnerOneOf) SetSelectFirstIfMultiple(v bool) { + o.SelectFirstIfMultiple = &v +} + func (o ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInnerOneOf) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -178,6 +211,9 @@ func (o ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsIn if !IsNil(o.Timeout) { toSerialize["timeout"] = o.Timeout } + if !IsNil(o.SelectFirstIfMultiple) { + toSerialize["select_first_if_multiple"] = o.SelectFirstIfMultiple + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -226,6 +262,7 @@ func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsI delete(additionalProperties, "allow_failure") delete(additionalProperties, "locator") delete(additionalProperties, "timeout") + delete(additionalProperties, "select_first_if_multiple") o.AdditionalProperties = additionalProperties } diff --git a/pkg/api/v3/model_profile_detailed_configuration_authentication_users_inner_credentials_actions_inner_one_of_1.go b/pkg/api/v3/model_profile_detailed_configuration_authentication_users_inner_credentials_actions_inner_one_of_1.go index dfad43d2..76dea2ef 100644 --- a/pkg/api/v3/model_profile_detailed_configuration_authentication_users_inner_credentials_actions_inner_one_of_1.go +++ b/pkg/api/v3/model_profile_detailed_configuration_authentication_users_inner_credentials_actions_inner_one_of_1.go @@ -27,6 +27,7 @@ type ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInner Value string `json:"value"` AutoSubmit *bool `json:"auto_submit,omitempty"` Timeout *float32 `json:"timeout,omitempty"` + SelectFirstIfMultiple *bool `json:"select_first_if_multiple,omitempty"` AdditionalProperties map[string]interface{} } @@ -252,6 +253,38 @@ func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsI o.Timeout = &v } +// GetSelectFirstIfMultiple returns the SelectFirstIfMultiple field value if set, zero value otherwise. +func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInnerOneOf1) GetSelectFirstIfMultiple() bool { + if o == nil || IsNil(o.SelectFirstIfMultiple) { + var ret bool + return ret + } + return *o.SelectFirstIfMultiple +} + +// GetSelectFirstIfMultipleOk returns a tuple with the SelectFirstIfMultiple field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInnerOneOf1) GetSelectFirstIfMultipleOk() (*bool, bool) { + if o == nil || IsNil(o.SelectFirstIfMultiple) { + return nil, false + } + return o.SelectFirstIfMultiple, true +} + +// HasSelectFirstIfMultiple returns a boolean if a field has been set. +func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInnerOneOf1) HasSelectFirstIfMultiple() bool { + if o != nil && !IsNil(o.SelectFirstIfMultiple) { + return true + } + + return false +} + +// SetSelectFirstIfMultiple gets a reference to the given bool and assigns it to the SelectFirstIfMultiple field. +func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInnerOneOf1) SetSelectFirstIfMultiple(v bool) { + o.SelectFirstIfMultiple = &v +} + func (o ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInnerOneOf1) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -277,6 +310,9 @@ func (o ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsIn if !IsNil(o.Timeout) { toSerialize["timeout"] = o.Timeout } + if !IsNil(o.SelectFirstIfMultiple) { + toSerialize["select_first_if_multiple"] = o.SelectFirstIfMultiple + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -329,6 +365,7 @@ func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsI delete(additionalProperties, "value") delete(additionalProperties, "auto_submit") delete(additionalProperties, "timeout") + delete(additionalProperties, "select_first_if_multiple") o.AdditionalProperties = additionalProperties } diff --git a/pkg/api/v3/model_profile_detailed_configuration_authentication_users_inner_credentials_actions_inner_one_of_4.go b/pkg/api/v3/model_profile_detailed_configuration_authentication_users_inner_credentials_actions_inner_one_of_4.go index de51f929..58630c17 100644 --- a/pkg/api/v3/model_profile_detailed_configuration_authentication_users_inner_credentials_actions_inner_one_of_4.go +++ b/pkg/api/v3/model_profile_detailed_configuration_authentication_users_inner_credentials_actions_inner_one_of_4.go @@ -24,6 +24,7 @@ type ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInner AllowFailure *bool `json:"allow_failure,omitempty"` Locator string `json:"locator"` Timeout *float32 `json:"timeout,omitempty"` + SelectFirstIfMultiple *bool `json:"select_first_if_multiple,omitempty"` AdditionalProperties map[string]interface{} } @@ -160,6 +161,38 @@ func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsI o.Timeout = &v } +// GetSelectFirstIfMultiple returns the SelectFirstIfMultiple field value if set, zero value otherwise. +func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInnerOneOf4) GetSelectFirstIfMultiple() bool { + if o == nil || IsNil(o.SelectFirstIfMultiple) { + var ret bool + return ret + } + return *o.SelectFirstIfMultiple +} + +// GetSelectFirstIfMultipleOk returns a tuple with the SelectFirstIfMultiple field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInnerOneOf4) GetSelectFirstIfMultipleOk() (*bool, bool) { + if o == nil || IsNil(o.SelectFirstIfMultiple) { + return nil, false + } + return o.SelectFirstIfMultiple, true +} + +// HasSelectFirstIfMultiple returns a boolean if a field has been set. +func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInnerOneOf4) HasSelectFirstIfMultiple() bool { + if o != nil && !IsNil(o.SelectFirstIfMultiple) { + return true + } + + return false +} + +// SetSelectFirstIfMultiple gets a reference to the given bool and assigns it to the SelectFirstIfMultiple field. +func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInnerOneOf4) SetSelectFirstIfMultiple(v bool) { + o.SelectFirstIfMultiple = &v +} + func (o ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInnerOneOf4) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -178,6 +211,9 @@ func (o ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsIn if !IsNil(o.Timeout) { toSerialize["timeout"] = o.Timeout } + if !IsNil(o.SelectFirstIfMultiple) { + toSerialize["select_first_if_multiple"] = o.SelectFirstIfMultiple + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -226,6 +262,7 @@ func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsI delete(additionalProperties, "allow_failure") delete(additionalProperties, "locator") delete(additionalProperties, "timeout") + delete(additionalProperties, "select_first_if_multiple") o.AdditionalProperties = additionalProperties } diff --git a/pkg/api/v3/model_profile_detailed_configuration_authentication_users_inner_credentials_actions_inner_one_of_5.go b/pkg/api/v3/model_profile_detailed_configuration_authentication_users_inner_credentials_actions_inner_one_of_5.go index 94d6790f..b6a3e474 100644 --- a/pkg/api/v3/model_profile_detailed_configuration_authentication_users_inner_credentials_actions_inner_one_of_5.go +++ b/pkg/api/v3/model_profile_detailed_configuration_authentication_users_inner_credentials_actions_inner_one_of_5.go @@ -25,6 +25,7 @@ type ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInner Locator string `json:"locator"` Value string `json:"value"` Timeout *float32 `json:"timeout,omitempty"` + SelectFirstIfMultiple *bool `json:"select_first_if_multiple,omitempty"` AdditionalProperties map[string]interface{} } @@ -186,6 +187,38 @@ func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsI o.Timeout = &v } +// GetSelectFirstIfMultiple returns the SelectFirstIfMultiple field value if set, zero value otherwise. +func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInnerOneOf5) GetSelectFirstIfMultiple() bool { + if o == nil || IsNil(o.SelectFirstIfMultiple) { + var ret bool + return ret + } + return *o.SelectFirstIfMultiple +} + +// GetSelectFirstIfMultipleOk returns a tuple with the SelectFirstIfMultiple field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInnerOneOf5) GetSelectFirstIfMultipleOk() (*bool, bool) { + if o == nil || IsNil(o.SelectFirstIfMultiple) { + return nil, false + } + return o.SelectFirstIfMultiple, true +} + +// HasSelectFirstIfMultiple returns a boolean if a field has been set. +func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInnerOneOf5) HasSelectFirstIfMultiple() bool { + if o != nil && !IsNil(o.SelectFirstIfMultiple) { + return true + } + + return false +} + +// SetSelectFirstIfMultiple gets a reference to the given bool and assigns it to the SelectFirstIfMultiple field. +func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInnerOneOf5) SetSelectFirstIfMultiple(v bool) { + o.SelectFirstIfMultiple = &v +} + func (o ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsInnerOneOf5) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -205,6 +238,9 @@ func (o ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsIn if !IsNil(o.Timeout) { toSerialize["timeout"] = o.Timeout } + if !IsNil(o.SelectFirstIfMultiple) { + toSerialize["select_first_if_multiple"] = o.SelectFirstIfMultiple + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -255,6 +291,7 @@ func (o *ProfileDetailedConfigurationAuthenticationUsersInnerCredentialsActionsI delete(additionalProperties, "locator") delete(additionalProperties, "value") delete(additionalProperties, "timeout") + delete(additionalProperties, "select_first_if_multiple") o.AdditionalProperties = additionalProperties } diff --git a/pkg/api/v3/model_profile_detailed_configuration_experimental.go b/pkg/api/v3/model_profile_detailed_configuration_experimental.go index 493d0272..076aec78 100644 --- a/pkg/api/v3/model_profile_detailed_configuration_experimental.go +++ b/pkg/api/v3/model_profile_detailed_configuration_experimental.go @@ -26,6 +26,7 @@ type ProfileDetailedConfigurationExperimental struct { BlstEnabled *bool `json:"blst_enabled,omitempty"` BlstExplorationOnly *bool `json:"blst_exploration_only,omitempty"` DisableOracle *bool `json:"disable_oracle,omitempty"` + AgenticIdor *bool `json:"agentic_idor,omitempty"` AdditionalProperties map[string]interface{} } @@ -272,6 +273,38 @@ func (o *ProfileDetailedConfigurationExperimental) SetDisableOracle(v bool) { o.DisableOracle = &v } +// GetAgenticIdor returns the AgenticIdor field value if set, zero value otherwise. +func (o *ProfileDetailedConfigurationExperimental) GetAgenticIdor() bool { + if o == nil || IsNil(o.AgenticIdor) { + var ret bool + return ret + } + return *o.AgenticIdor +} + +// GetAgenticIdorOk returns a tuple with the AgenticIdor field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProfileDetailedConfigurationExperimental) GetAgenticIdorOk() (*bool, bool) { + if o == nil || IsNil(o.AgenticIdor) { + return nil, false + } + return o.AgenticIdor, true +} + +// HasAgenticIdor returns a boolean if a field has been set. +func (o *ProfileDetailedConfigurationExperimental) HasAgenticIdor() bool { + if o != nil && !IsNil(o.AgenticIdor) { + return true + } + + return false +} + +// SetAgenticIdor gets a reference to the given bool and assigns it to the AgenticIdor field. +func (o *ProfileDetailedConfigurationExperimental) SetAgenticIdor(v bool) { + o.AgenticIdor = &v +} + func (o ProfileDetailedConfigurationExperimental) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -303,6 +336,9 @@ func (o ProfileDetailedConfigurationExperimental) ToMap() (map[string]interface{ if !IsNil(o.DisableOracle) { toSerialize["disable_oracle"] = o.DisableOracle } + if !IsNil(o.AgenticIdor) { + toSerialize["agentic_idor"] = o.AgenticIdor + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -332,6 +368,7 @@ func (o *ProfileDetailedConfigurationExperimental) UnmarshalJSON(data []byte) (e delete(additionalProperties, "blst_enabled") delete(additionalProperties, "blst_exploration_only") delete(additionalProperties, "disable_oracle") + delete(additionalProperties, "agentic_idor") o.AdditionalProperties = additionalProperties } diff --git a/pkg/api/v3/model_profile_detailed_configuration_network.go b/pkg/api/v3/model_profile_detailed_configuration_network.go index 15409dda..b092cdd1 100644 --- a/pkg/api/v3/model_profile_detailed_configuration_network.go +++ b/pkg/api/v3/model_profile_detailed_configuration_network.go @@ -24,6 +24,7 @@ type ProfileDetailedConfigurationNetwork struct { CustomHeaders map[string][]string `json:"custom_headers,omitempty"` CancelUnhealthyScanAfter *float32 `json:"cancel_unhealthy_scan_after,omitempty"` EscapeUser *bool `json:"escape_user,omitempty"` + SecEscapeUser *bool `json:"sec_escape_user,omitempty"` FfFrontendNextSender *bool `json:"ff_frontend_next_sender,omitempty"` ParallelRequests *float32 `json:"parallel_requests,omitempty"` AdditionalProperties map[string]interface{} @@ -208,6 +209,38 @@ func (o *ProfileDetailedConfigurationNetwork) SetEscapeUser(v bool) { o.EscapeUser = &v } +// GetSecEscapeUser returns the SecEscapeUser field value if set, zero value otherwise. +func (o *ProfileDetailedConfigurationNetwork) GetSecEscapeUser() bool { + if o == nil || IsNil(o.SecEscapeUser) { + var ret bool + return ret + } + return *o.SecEscapeUser +} + +// GetSecEscapeUserOk returns a tuple with the SecEscapeUser field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProfileDetailedConfigurationNetwork) GetSecEscapeUserOk() (*bool, bool) { + if o == nil || IsNil(o.SecEscapeUser) { + return nil, false + } + return o.SecEscapeUser, true +} + +// HasSecEscapeUser returns a boolean if a field has been set. +func (o *ProfileDetailedConfigurationNetwork) HasSecEscapeUser() bool { + if o != nil && !IsNil(o.SecEscapeUser) { + return true + } + + return false +} + +// SetSecEscapeUser gets a reference to the given bool and assigns it to the SecEscapeUser field. +func (o *ProfileDetailedConfigurationNetwork) SetSecEscapeUser(v bool) { + o.SecEscapeUser = &v +} + // GetFfFrontendNextSender returns the FfFrontendNextSender field value if set, zero value otherwise. func (o *ProfileDetailedConfigurationNetwork) GetFfFrontendNextSender() bool { if o == nil || IsNil(o.FfFrontendNextSender) { @@ -297,6 +330,9 @@ func (o ProfileDetailedConfigurationNetwork) ToMap() (map[string]interface{}, er if !IsNil(o.EscapeUser) { toSerialize["escape_user"] = o.EscapeUser } + if !IsNil(o.SecEscapeUser) { + toSerialize["sec_escape_user"] = o.SecEscapeUser + } if !IsNil(o.FfFrontendNextSender) { toSerialize["ff_frontend_next_sender"] = o.FfFrontendNextSender } @@ -330,6 +366,7 @@ func (o *ProfileDetailedConfigurationNetwork) UnmarshalJSON(data []byte) (err er delete(additionalProperties, "custom_headers") delete(additionalProperties, "cancel_unhealthy_scan_after") delete(additionalProperties, "escape_user") + delete(additionalProperties, "sec_escape_user") delete(additionalProperties, "ff_frontend_next_sender") delete(additionalProperties, "parallel_requests") o.AdditionalProperties = additionalProperties diff --git a/pkg/api/v3/model_profile_detailed_configuration_security_tests.go b/pkg/api/v3/model_profile_detailed_configuration_security_tests.go index c92f9d0e..bd915c0a 100644 --- a/pkg/api/v3/model_profile_detailed_configuration_security_tests.go +++ b/pkg/api/v3/model_profile_detailed_configuration_security_tests.go @@ -197,6 +197,7 @@ type ProfileDetailedConfigurationSecurityTests struct { ZombieObject *ProfileDetailedConfigurationSecurityTestsAirflowConfigExposure `json:"zombie_object,omitempty"` FlaskSessionCookie *ProfileDetailedConfigurationSecurityTestsAirflowConfigExposure `json:"flask_session_cookie,omitempty"` RowLevelSecurity *ProfileDetailedConfigurationSecurityTestsAirflowConfigExposure `json:"row_level_security,omitempty"` + CompromisedSupplyChain *ProfileDetailedConfigurationSecurityTestsAirflowConfigExposure `json:"compromised_supply_chain,omitempty"` AdditionalProperties map[string]interface{} } @@ -5915,6 +5916,38 @@ func (o *ProfileDetailedConfigurationSecurityTests) SetRowLevelSecurity(v Profil o.RowLevelSecurity = &v } +// GetCompromisedSupplyChain returns the CompromisedSupplyChain field value if set, zero value otherwise. +func (o *ProfileDetailedConfigurationSecurityTests) GetCompromisedSupplyChain() ProfileDetailedConfigurationSecurityTestsAirflowConfigExposure { + if o == nil || IsNil(o.CompromisedSupplyChain) { + var ret ProfileDetailedConfigurationSecurityTestsAirflowConfigExposure + return ret + } + return *o.CompromisedSupplyChain +} + +// GetCompromisedSupplyChainOk returns a tuple with the CompromisedSupplyChain field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *ProfileDetailedConfigurationSecurityTests) GetCompromisedSupplyChainOk() (*ProfileDetailedConfigurationSecurityTestsAirflowConfigExposure, bool) { + if o == nil || IsNil(o.CompromisedSupplyChain) { + return nil, false + } + return o.CompromisedSupplyChain, true +} + +// HasCompromisedSupplyChain returns a boolean if a field has been set. +func (o *ProfileDetailedConfigurationSecurityTests) HasCompromisedSupplyChain() bool { + if o != nil && !IsNil(o.CompromisedSupplyChain) { + return true + } + + return false +} + +// SetCompromisedSupplyChain gets a reference to the given ProfileDetailedConfigurationSecurityTestsAirflowConfigExposure and assigns it to the CompromisedSupplyChain field. +func (o *ProfileDetailedConfigurationSecurityTests) SetCompromisedSupplyChain(v ProfileDetailedConfigurationSecurityTestsAirflowConfigExposure) { + o.CompromisedSupplyChain = &v +} + func (o ProfileDetailedConfigurationSecurityTests) MarshalJSON() ([]byte, error) { toSerialize,err := o.ToMap() if err != nil { @@ -6459,6 +6492,9 @@ func (o ProfileDetailedConfigurationSecurityTests) ToMap() (map[string]interface if !IsNil(o.RowLevelSecurity) { toSerialize["row_level_security"] = o.RowLevelSecurity } + if !IsNil(o.CompromisedSupplyChain) { + toSerialize["compromised_supply_chain"] = o.CompromisedSupplyChain + } for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -6659,6 +6695,7 @@ func (o *ProfileDetailedConfigurationSecurityTests) UnmarshalJSON(data []byte) ( delete(additionalProperties, "zombie_object") delete(additionalProperties, "flask_session_cookie") delete(additionalProperties, "row_level_security") + delete(additionalProperties, "compromised_supply_chain") o.AdditionalProperties = additionalProperties } diff --git a/pkg/api/v3/model_schema_detailed.go b/pkg/api/v3/model_schema_detailed.go deleted file mode 100644 index 8f9405e2..00000000 --- a/pkg/api/v3/model_schema_detailed.go +++ /dev/null @@ -1,237 +0,0 @@ -/* -Escape Public API - -This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). - -API version: 3.0.0 -*/ - -// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. - -package v3 - -import ( - "encoding/json" - "fmt" -) - -// checks if the SchemaDetailed type satisfies the MappedNullable interface at compile time -var _ MappedNullable = &SchemaDetailed{} - -// SchemaDetailed Detailed information about a schema -type SchemaDetailed struct { - // The id of the schema - Id string `json:"id"` - // The url of the schema - Url *string `json:"url,omitempty"` - // Whether the schema is generated - Generated bool `json:"generated"` - AdditionalProperties map[string]interface{} -} - -type _SchemaDetailed SchemaDetailed - -// NewSchemaDetailed instantiates a new SchemaDetailed object -// This constructor will assign default values to properties that have it defined, -// and makes sure properties required by API are set, but the set of arguments -// will change when the set of required properties is changed -func NewSchemaDetailed(id string, generated bool) *SchemaDetailed { - this := SchemaDetailed{} - this.Id = id - this.Generated = generated - return &this -} - -// NewSchemaDetailedWithDefaults instantiates a new SchemaDetailed object -// This constructor will only assign default values to properties that have it defined, -// but it doesn't guarantee that properties required by API are set -func NewSchemaDetailedWithDefaults() *SchemaDetailed { - this := SchemaDetailed{} - return &this -} - -// GetId returns the Id field value -func (o *SchemaDetailed) GetId() string { - if o == nil { - var ret string - return ret - } - - return o.Id -} - -// GetIdOk returns a tuple with the Id field value -// and a boolean to check if the value has been set. -func (o *SchemaDetailed) GetIdOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.Id, true -} - -// SetId sets field value -func (o *SchemaDetailed) SetId(v string) { - o.Id = v -} - -// GetUrl returns the Url field value if set, zero value otherwise. -func (o *SchemaDetailed) GetUrl() string { - if o == nil || IsNil(o.Url) { - var ret string - return ret - } - return *o.Url -} - -// GetUrlOk returns a tuple with the Url field value if set, nil otherwise -// and a boolean to check if the value has been set. -func (o *SchemaDetailed) GetUrlOk() (*string, bool) { - if o == nil || IsNil(o.Url) { - return nil, false - } - return o.Url, true -} - -// HasUrl returns a boolean if a field has been set. -func (o *SchemaDetailed) HasUrl() bool { - if o != nil && !IsNil(o.Url) { - return true - } - - return false -} - -// SetUrl gets a reference to the given string and assigns it to the Url field. -func (o *SchemaDetailed) SetUrl(v string) { - o.Url = &v -} - -// GetGenerated returns the Generated field value -func (o *SchemaDetailed) GetGenerated() bool { - if o == nil { - var ret bool - return ret - } - - return o.Generated -} - -// GetGeneratedOk returns a tuple with the Generated field value -// and a boolean to check if the value has been set. -func (o *SchemaDetailed) GetGeneratedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Generated, true -} - -// SetGenerated sets field value -func (o *SchemaDetailed) SetGenerated(v bool) { - o.Generated = v -} - -func (o SchemaDetailed) MarshalJSON() ([]byte, error) { - toSerialize,err := o.ToMap() - if err != nil { - return []byte{}, err - } - return json.Marshal(toSerialize) -} - -func (o SchemaDetailed) ToMap() (map[string]interface{}, error) { - toSerialize := map[string]interface{}{} - toSerialize["id"] = o.Id - if !IsNil(o.Url) { - toSerialize["url"] = o.Url - } - toSerialize["generated"] = o.Generated - - for key, value := range o.AdditionalProperties { - toSerialize[key] = value - } - - return toSerialize, nil -} - -func (o *SchemaDetailed) UnmarshalJSON(data []byte) (err error) { - // This validates that all required properties are included in the JSON object - // by unmarshalling the object into a generic map with string keys and checking - // that every required field exists as a key in the generic map. - requiredProperties := []string{ - "id", - "generated", - } - - allProperties := make(map[string]interface{}) - - err = json.Unmarshal(data, &allProperties) - - if err != nil { - return err; - } - - for _, requiredProperty := range(requiredProperties) { - if _, exists := allProperties[requiredProperty]; !exists { - return fmt.Errorf("no value given for required property %v", requiredProperty) - } - } - - varSchemaDetailed := _SchemaDetailed{} - - err = json.Unmarshal(data, &varSchemaDetailed) - - if err != nil { - return err - } - - *o = SchemaDetailed(varSchemaDetailed) - - additionalProperties := make(map[string]interface{}) - - if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "id") - delete(additionalProperties, "url") - delete(additionalProperties, "generated") - o.AdditionalProperties = additionalProperties - } - - return err -} - -type NullableSchemaDetailed struct { - value *SchemaDetailed - isSet bool -} - -func (v NullableSchemaDetailed) Get() *SchemaDetailed { - return v.value -} - -func (v *NullableSchemaDetailed) Set(val *SchemaDetailed) { - v.value = val - v.isSet = true -} - -func (v NullableSchemaDetailed) IsSet() bool { - return v.isSet -} - -func (v *NullableSchemaDetailed) Unset() { - v.value = nil - v.isSet = false -} - -func NewNullableSchemaDetailed(val *SchemaDetailed) *NullableSchemaDetailed { - return &NullableSchemaDetailed{value: val, isSet: true} -} - -func (v NullableSchemaDetailed) MarshalJSON() ([]byte, error) { - return json.Marshal(v.value) -} - -func (v *NullableSchemaDetailed) UnmarshalJSON(src []byte) error { - v.isSet = true - return json.Unmarshal(src, &v.value) -} - - diff --git a/pkg/api/v3/model_update_profile_schema_request.go b/pkg/api/v3/model_update_profile_schema_request.go index 47ec89f7..305a1fe5 100644 --- a/pkg/api/v3/model_update_profile_schema_request.go +++ b/pkg/api/v3/model_update_profile_schema_request.go @@ -20,12 +20,8 @@ var _ MappedNullable = &UpdateProfileSchemaRequest{} // UpdateProfileSchemaRequest struct for UpdateProfileSchemaRequest type UpdateProfileSchemaRequest struct { - // The profile ID - ProfileId string `json:"profileId"` - // The schema URL - SchemaUrl string `json:"schemaUrl"` - // Whether the schema is uploaded - Uploaded bool `json:"uploaded"` + // The asset schema ID + SchemaId string `json:"schemaId"` AdditionalProperties map[string]interface{} } @@ -35,11 +31,9 @@ type _UpdateProfileSchemaRequest UpdateProfileSchemaRequest // This constructor will assign default values to properties that have it defined, // and makes sure properties required by API are set, but the set of arguments // will change when the set of required properties is changed -func NewUpdateProfileSchemaRequest(profileId string, schemaUrl string, uploaded bool) *UpdateProfileSchemaRequest { +func NewUpdateProfileSchemaRequest(schemaId string) *UpdateProfileSchemaRequest { this := UpdateProfileSchemaRequest{} - this.ProfileId = profileId - this.SchemaUrl = schemaUrl - this.Uploaded = uploaded + this.SchemaId = schemaId return &this } @@ -51,76 +45,28 @@ func NewUpdateProfileSchemaRequestWithDefaults() *UpdateProfileSchemaRequest { return &this } -// GetProfileId returns the ProfileId field value -func (o *UpdateProfileSchemaRequest) GetProfileId() string { +// GetSchemaId returns the SchemaId field value +func (o *UpdateProfileSchemaRequest) GetSchemaId() string { if o == nil { var ret string return ret } - return o.ProfileId + return o.SchemaId } -// GetProfileIdOk returns a tuple with the ProfileId field value +// GetSchemaIdOk returns a tuple with the SchemaId field value // and a boolean to check if the value has been set. -func (o *UpdateProfileSchemaRequest) GetProfileIdOk() (*string, bool) { +func (o *UpdateProfileSchemaRequest) GetSchemaIdOk() (*string, bool) { if o == nil { return nil, false } - return &o.ProfileId, true + return &o.SchemaId, true } -// SetProfileId sets field value -func (o *UpdateProfileSchemaRequest) SetProfileId(v string) { - o.ProfileId = v -} - -// GetSchemaUrl returns the SchemaUrl field value -func (o *UpdateProfileSchemaRequest) GetSchemaUrl() string { - if o == nil { - var ret string - return ret - } - - return o.SchemaUrl -} - -// GetSchemaUrlOk returns a tuple with the SchemaUrl field value -// and a boolean to check if the value has been set. -func (o *UpdateProfileSchemaRequest) GetSchemaUrlOk() (*string, bool) { - if o == nil { - return nil, false - } - return &o.SchemaUrl, true -} - -// SetSchemaUrl sets field value -func (o *UpdateProfileSchemaRequest) SetSchemaUrl(v string) { - o.SchemaUrl = v -} - -// GetUploaded returns the Uploaded field value -func (o *UpdateProfileSchemaRequest) GetUploaded() bool { - if o == nil { - var ret bool - return ret - } - - return o.Uploaded -} - -// GetUploadedOk returns a tuple with the Uploaded field value -// and a boolean to check if the value has been set. -func (o *UpdateProfileSchemaRequest) GetUploadedOk() (*bool, bool) { - if o == nil { - return nil, false - } - return &o.Uploaded, true -} - -// SetUploaded sets field value -func (o *UpdateProfileSchemaRequest) SetUploaded(v bool) { - o.Uploaded = v +// SetSchemaId sets field value +func (o *UpdateProfileSchemaRequest) SetSchemaId(v string) { + o.SchemaId = v } func (o UpdateProfileSchemaRequest) MarshalJSON() ([]byte, error) { @@ -133,9 +79,7 @@ func (o UpdateProfileSchemaRequest) MarshalJSON() ([]byte, error) { func (o UpdateProfileSchemaRequest) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} - toSerialize["profileId"] = o.ProfileId - toSerialize["schemaUrl"] = o.SchemaUrl - toSerialize["uploaded"] = o.Uploaded + toSerialize["schemaId"] = o.SchemaId for key, value := range o.AdditionalProperties { toSerialize[key] = value @@ -149,9 +93,7 @@ func (o *UpdateProfileSchemaRequest) UnmarshalJSON(data []byte) (err error) { // by unmarshalling the object into a generic map with string keys and checking // that every required field exists as a key in the generic map. requiredProperties := []string{ - "profileId", - "schemaUrl", - "uploaded", + "schemaId", } allProperties := make(map[string]interface{}) @@ -181,9 +123,7 @@ func (o *UpdateProfileSchemaRequest) UnmarshalJSON(data []byte) (err error) { additionalProperties := make(map[string]interface{}) if err = json.Unmarshal(data, &additionalProperties); err == nil { - delete(additionalProperties, "profileId") - delete(additionalProperties, "schemaUrl") - delete(additionalProperties, "uploaded") + delete(additionalProperties, "schemaId") o.AdditionalProperties = additionalProperties } diff --git a/pkg/api/v3/model_update_workflow_request.go b/pkg/api/v3/model_update_workflow_request.go new file mode 100644 index 00000000..d38b949a --- /dev/null +++ b/pkg/api/v3/model_update_workflow_request.go @@ -0,0 +1,358 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the UpdateWorkflowRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateWorkflowRequest{} + +// UpdateWorkflowRequest struct for UpdateWorkflowRequest +type UpdateWorkflowRequest struct { + // The new name of the integration + Name *string `json:"name,omitempty"` + Trigger ENUMPROPERTIESTRIGGER `json:"trigger"` + // The throttle in milliseconds for the workflow. + ThrottleMs *float32 `json:"throttleMs,omitempty"` + // The filters to update the workflow with, this will replace the existing filters + Filters []UpdateWorkflowRequestFiltersInner `json:"filters,omitempty"` + // The actions to update the workflow with, this will replace the existing actions + Actions []UpdateWorkflowRequestActionsInner `json:"actions,omitempty"` + // Optional list of project IDs to attach to the integration + ProjectIds []string `json:"projectIds,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateWorkflowRequest UpdateWorkflowRequest + +// NewUpdateWorkflowRequest instantiates a new UpdateWorkflowRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateWorkflowRequest(trigger ENUMPROPERTIESTRIGGER) *UpdateWorkflowRequest { + this := UpdateWorkflowRequest{} + this.Trigger = trigger + return &this +} + +// NewUpdateWorkflowRequestWithDefaults instantiates a new UpdateWorkflowRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateWorkflowRequestWithDefaults() *UpdateWorkflowRequest { + this := UpdateWorkflowRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateWorkflowRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateWorkflowRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateWorkflowRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateWorkflowRequest) SetName(v string) { + o.Name = &v +} + +// GetTrigger returns the Trigger field value +func (o *UpdateWorkflowRequest) GetTrigger() ENUMPROPERTIESTRIGGER { + if o == nil { + var ret ENUMPROPERTIESTRIGGER + return ret + } + + return o.Trigger +} + +// GetTriggerOk returns a tuple with the Trigger field value +// and a boolean to check if the value has been set. +func (o *UpdateWorkflowRequest) GetTriggerOk() (*ENUMPROPERTIESTRIGGER, bool) { + if o == nil { + return nil, false + } + return &o.Trigger, true +} + +// SetTrigger sets field value +func (o *UpdateWorkflowRequest) SetTrigger(v ENUMPROPERTIESTRIGGER) { + o.Trigger = v +} + +// GetThrottleMs returns the ThrottleMs field value if set, zero value otherwise. +func (o *UpdateWorkflowRequest) GetThrottleMs() float32 { + if o == nil || IsNil(o.ThrottleMs) { + var ret float32 + return ret + } + return *o.ThrottleMs +} + +// GetThrottleMsOk returns a tuple with the ThrottleMs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateWorkflowRequest) GetThrottleMsOk() (*float32, bool) { + if o == nil || IsNil(o.ThrottleMs) { + return nil, false + } + return o.ThrottleMs, true +} + +// HasThrottleMs returns a boolean if a field has been set. +func (o *UpdateWorkflowRequest) HasThrottleMs() bool { + if o != nil && !IsNil(o.ThrottleMs) { + return true + } + + return false +} + +// SetThrottleMs gets a reference to the given float32 and assigns it to the ThrottleMs field. +func (o *UpdateWorkflowRequest) SetThrottleMs(v float32) { + o.ThrottleMs = &v +} + +// GetFilters returns the Filters field value if set, zero value otherwise. +func (o *UpdateWorkflowRequest) GetFilters() []UpdateWorkflowRequestFiltersInner { + if o == nil || IsNil(o.Filters) { + var ret []UpdateWorkflowRequestFiltersInner + return ret + } + return o.Filters +} + +// GetFiltersOk returns a tuple with the Filters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateWorkflowRequest) GetFiltersOk() ([]UpdateWorkflowRequestFiltersInner, bool) { + if o == nil || IsNil(o.Filters) { + return nil, false + } + return o.Filters, true +} + +// HasFilters returns a boolean if a field has been set. +func (o *UpdateWorkflowRequest) HasFilters() bool { + if o != nil && !IsNil(o.Filters) { + return true + } + + return false +} + +// SetFilters gets a reference to the given []UpdateWorkflowRequestFiltersInner and assigns it to the Filters field. +func (o *UpdateWorkflowRequest) SetFilters(v []UpdateWorkflowRequestFiltersInner) { + o.Filters = v +} + +// GetActions returns the Actions field value if set, zero value otherwise. +func (o *UpdateWorkflowRequest) GetActions() []UpdateWorkflowRequestActionsInner { + if o == nil || IsNil(o.Actions) { + var ret []UpdateWorkflowRequestActionsInner + return ret + } + return o.Actions +} + +// GetActionsOk returns a tuple with the Actions field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateWorkflowRequest) GetActionsOk() ([]UpdateWorkflowRequestActionsInner, bool) { + if o == nil || IsNil(o.Actions) { + return nil, false + } + return o.Actions, true +} + +// HasActions returns a boolean if a field has been set. +func (o *UpdateWorkflowRequest) HasActions() bool { + if o != nil && !IsNil(o.Actions) { + return true + } + + return false +} + +// SetActions gets a reference to the given []UpdateWorkflowRequestActionsInner and assigns it to the Actions field. +func (o *UpdateWorkflowRequest) SetActions(v []UpdateWorkflowRequestActionsInner) { + o.Actions = v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *UpdateWorkflowRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateWorkflowRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *UpdateWorkflowRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *UpdateWorkflowRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o UpdateWorkflowRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateWorkflowRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + toSerialize["trigger"] = o.Trigger + if !IsNil(o.ThrottleMs) { + toSerialize["throttleMs"] = o.ThrottleMs + } + if !IsNil(o.Filters) { + toSerialize["filters"] = o.Filters + } + if !IsNil(o.Actions) { + toSerialize["actions"] = o.Actions + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateWorkflowRequest) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "trigger", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUpdateWorkflowRequest := _UpdateWorkflowRequest{} + + err = json.Unmarshal(data, &varUpdateWorkflowRequest) + + if err != nil { + return err + } + + *o = UpdateWorkflowRequest(varUpdateWorkflowRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "trigger") + delete(additionalProperties, "throttleMs") + delete(additionalProperties, "filters") + delete(additionalProperties, "actions") + delete(additionalProperties, "projectIds") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateWorkflowRequest struct { + value *UpdateWorkflowRequest + isSet bool +} + +func (v NullableUpdateWorkflowRequest) Get() *UpdateWorkflowRequest { + return v.value +} + +func (v *NullableUpdateWorkflowRequest) Set(val *UpdateWorkflowRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateWorkflowRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateWorkflowRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateWorkflowRequest(val *UpdateWorkflowRequest) *NullableUpdateWorkflowRequest { + return &NullableUpdateWorkflowRequest{value: val, isSet: true} +} + +func (v NullableUpdateWorkflowRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateWorkflowRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_update_workflow_request_actions_inner.go b/pkg/api/v3/model_update_workflow_request_actions_inner.go new file mode 100644 index 00000000..6f8925ea --- /dev/null +++ b/pkg/api/v3/model_update_workflow_request_actions_inner.go @@ -0,0 +1,197 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + + +// UpdateWorkflowRequestActionsInner struct for UpdateWorkflowRequestActionsInner +type UpdateWorkflowRequestActionsInner struct { + CreateExportWorkflowActionUsingJira *CreateExportWorkflowActionUsingJira + CreateExportWorkflowActionUsingWebhook *CreateExportWorkflowActionUsingWebhook + CreateExportWorkflowActionUsingWiz *CreateExportWorkflowActionUsingWiz + CreateNotifyWorkflowActionUsingDiscord *CreateNotifyWorkflowActionUsingDiscord + CreateNotifyWorkflowActionUsingEmail *CreateNotifyWorkflowActionUsingEmail + CreateNotifyWorkflowActionUsingSlack *CreateNotifyWorkflowActionUsingSlack + CreateNotifyWorkflowActionUsingTeams *CreateNotifyWorkflowActionUsingTeams +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *UpdateWorkflowRequestActionsInner) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into CreateExportWorkflowActionUsingJira + err = json.Unmarshal(data, &dst.CreateExportWorkflowActionUsingJira); + if err == nil { + jsonCreateExportWorkflowActionUsingJira, _ := json.Marshal(dst.CreateExportWorkflowActionUsingJira) + if string(jsonCreateExportWorkflowActionUsingJira) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingJira = nil + } else { + return nil // data stored in dst.CreateExportWorkflowActionUsingJira, return on the first match + } + } else { + dst.CreateExportWorkflowActionUsingJira = nil + } + + // try to unmarshal JSON data into CreateExportWorkflowActionUsingWebhook + err = json.Unmarshal(data, &dst.CreateExportWorkflowActionUsingWebhook); + if err == nil { + jsonCreateExportWorkflowActionUsingWebhook, _ := json.Marshal(dst.CreateExportWorkflowActionUsingWebhook) + if string(jsonCreateExportWorkflowActionUsingWebhook) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingWebhook = nil + } else { + return nil // data stored in dst.CreateExportWorkflowActionUsingWebhook, return on the first match + } + } else { + dst.CreateExportWorkflowActionUsingWebhook = nil + } + + // try to unmarshal JSON data into CreateExportWorkflowActionUsingWiz + err = json.Unmarshal(data, &dst.CreateExportWorkflowActionUsingWiz); + if err == nil { + jsonCreateExportWorkflowActionUsingWiz, _ := json.Marshal(dst.CreateExportWorkflowActionUsingWiz) + if string(jsonCreateExportWorkflowActionUsingWiz) == "{}" { // empty struct + dst.CreateExportWorkflowActionUsingWiz = nil + } else { + return nil // data stored in dst.CreateExportWorkflowActionUsingWiz, return on the first match + } + } else { + dst.CreateExportWorkflowActionUsingWiz = nil + } + + // try to unmarshal JSON data into CreateNotifyWorkflowActionUsingDiscord + err = json.Unmarshal(data, &dst.CreateNotifyWorkflowActionUsingDiscord); + if err == nil { + jsonCreateNotifyWorkflowActionUsingDiscord, _ := json.Marshal(dst.CreateNotifyWorkflowActionUsingDiscord) + if string(jsonCreateNotifyWorkflowActionUsingDiscord) == "{}" { // empty struct + dst.CreateNotifyWorkflowActionUsingDiscord = nil + } else { + return nil // data stored in dst.CreateNotifyWorkflowActionUsingDiscord, return on the first match + } + } else { + dst.CreateNotifyWorkflowActionUsingDiscord = nil + } + + // try to unmarshal JSON data into CreateNotifyWorkflowActionUsingEmail + err = json.Unmarshal(data, &dst.CreateNotifyWorkflowActionUsingEmail); + if err == nil { + jsonCreateNotifyWorkflowActionUsingEmail, _ := json.Marshal(dst.CreateNotifyWorkflowActionUsingEmail) + if string(jsonCreateNotifyWorkflowActionUsingEmail) == "{}" { // empty struct + dst.CreateNotifyWorkflowActionUsingEmail = nil + } else { + return nil // data stored in dst.CreateNotifyWorkflowActionUsingEmail, return on the first match + } + } else { + dst.CreateNotifyWorkflowActionUsingEmail = nil + } + + // try to unmarshal JSON data into CreateNotifyWorkflowActionUsingSlack + err = json.Unmarshal(data, &dst.CreateNotifyWorkflowActionUsingSlack); + if err == nil { + jsonCreateNotifyWorkflowActionUsingSlack, _ := json.Marshal(dst.CreateNotifyWorkflowActionUsingSlack) + if string(jsonCreateNotifyWorkflowActionUsingSlack) == "{}" { // empty struct + dst.CreateNotifyWorkflowActionUsingSlack = nil + } else { + return nil // data stored in dst.CreateNotifyWorkflowActionUsingSlack, return on the first match + } + } else { + dst.CreateNotifyWorkflowActionUsingSlack = nil + } + + // try to unmarshal JSON data into CreateNotifyWorkflowActionUsingTeams + err = json.Unmarshal(data, &dst.CreateNotifyWorkflowActionUsingTeams); + if err == nil { + jsonCreateNotifyWorkflowActionUsingTeams, _ := json.Marshal(dst.CreateNotifyWorkflowActionUsingTeams) + if string(jsonCreateNotifyWorkflowActionUsingTeams) == "{}" { // empty struct + dst.CreateNotifyWorkflowActionUsingTeams = nil + } else { + return nil // data stored in dst.CreateNotifyWorkflowActionUsingTeams, return on the first match + } + } else { + dst.CreateNotifyWorkflowActionUsingTeams = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(UpdateWorkflowRequestActionsInner)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src UpdateWorkflowRequestActionsInner) MarshalJSON() ([]byte, error) { + if src.CreateExportWorkflowActionUsingJira != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingJira) + } + + if src.CreateExportWorkflowActionUsingWebhook != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingWebhook) + } + + if src.CreateExportWorkflowActionUsingWiz != nil { + return json.Marshal(&src.CreateExportWorkflowActionUsingWiz) + } + + if src.CreateNotifyWorkflowActionUsingDiscord != nil { + return json.Marshal(&src.CreateNotifyWorkflowActionUsingDiscord) + } + + if src.CreateNotifyWorkflowActionUsingEmail != nil { + return json.Marshal(&src.CreateNotifyWorkflowActionUsingEmail) + } + + if src.CreateNotifyWorkflowActionUsingSlack != nil { + return json.Marshal(&src.CreateNotifyWorkflowActionUsingSlack) + } + + if src.CreateNotifyWorkflowActionUsingTeams != nil { + return json.Marshal(&src.CreateNotifyWorkflowActionUsingTeams) + } + + return nil, nil // no data in anyOf schemas +} + + +type NullableUpdateWorkflowRequestActionsInner struct { + value *UpdateWorkflowRequestActionsInner + isSet bool +} + +func (v NullableUpdateWorkflowRequestActionsInner) Get() *UpdateWorkflowRequestActionsInner { + return v.value +} + +func (v *NullableUpdateWorkflowRequestActionsInner) Set(val *UpdateWorkflowRequestActionsInner) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateWorkflowRequestActionsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateWorkflowRequestActionsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateWorkflowRequestActionsInner(val *UpdateWorkflowRequestActionsInner) *NullableUpdateWorkflowRequestActionsInner { + return &NullableUpdateWorkflowRequestActionsInner{value: val, isSet: true} +} + +func (v NullableUpdateWorkflowRequestActionsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateWorkflowRequestActionsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_update_workflow_request_filters_inner.go b/pkg/api/v3/model_update_workflow_request_filters_inner.go new file mode 100644 index 00000000..e6d4a790 --- /dev/null +++ b/pkg/api/v3/model_update_workflow_request_filters_inner.go @@ -0,0 +1,143 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + + +// UpdateWorkflowRequestFiltersInner struct for UpdateWorkflowRequestFiltersInner +type UpdateWorkflowRequestFiltersInner struct { + CreateWorkflowFilterUsingCustomFilterOnAssets *CreateWorkflowFilterUsingCustomFilterOnAssets + CreateWorkflowFilterUsingCustomFilterOnIssues *CreateWorkflowFilterUsingCustomFilterOnIssues + CreateWorkflowFilterUsingCustomFilterOnProfiles *CreateWorkflowFilterUsingCustomFilterOnProfiles + CreateWorkflowFilterUsingView *CreateWorkflowFilterUsingView +} + +// Unmarshal JSON data into any of the pointers in the struct +func (dst *UpdateWorkflowRequestFiltersInner) UnmarshalJSON(data []byte) error { + var err error + // try to unmarshal JSON data into CreateWorkflowFilterUsingCustomFilterOnAssets + err = json.Unmarshal(data, &dst.CreateWorkflowFilterUsingCustomFilterOnAssets); + if err == nil { + jsonCreateWorkflowFilterUsingCustomFilterOnAssets, _ := json.Marshal(dst.CreateWorkflowFilterUsingCustomFilterOnAssets) + if string(jsonCreateWorkflowFilterUsingCustomFilterOnAssets) == "{}" { // empty struct + dst.CreateWorkflowFilterUsingCustomFilterOnAssets = nil + } else { + return nil // data stored in dst.CreateWorkflowFilterUsingCustomFilterOnAssets, return on the first match + } + } else { + dst.CreateWorkflowFilterUsingCustomFilterOnAssets = nil + } + + // try to unmarshal JSON data into CreateWorkflowFilterUsingCustomFilterOnIssues + err = json.Unmarshal(data, &dst.CreateWorkflowFilterUsingCustomFilterOnIssues); + if err == nil { + jsonCreateWorkflowFilterUsingCustomFilterOnIssues, _ := json.Marshal(dst.CreateWorkflowFilterUsingCustomFilterOnIssues) + if string(jsonCreateWorkflowFilterUsingCustomFilterOnIssues) == "{}" { // empty struct + dst.CreateWorkflowFilterUsingCustomFilterOnIssues = nil + } else { + return nil // data stored in dst.CreateWorkflowFilterUsingCustomFilterOnIssues, return on the first match + } + } else { + dst.CreateWorkflowFilterUsingCustomFilterOnIssues = nil + } + + // try to unmarshal JSON data into CreateWorkflowFilterUsingCustomFilterOnProfiles + err = json.Unmarshal(data, &dst.CreateWorkflowFilterUsingCustomFilterOnProfiles); + if err == nil { + jsonCreateWorkflowFilterUsingCustomFilterOnProfiles, _ := json.Marshal(dst.CreateWorkflowFilterUsingCustomFilterOnProfiles) + if string(jsonCreateWorkflowFilterUsingCustomFilterOnProfiles) == "{}" { // empty struct + dst.CreateWorkflowFilterUsingCustomFilterOnProfiles = nil + } else { + return nil // data stored in dst.CreateWorkflowFilterUsingCustomFilterOnProfiles, return on the first match + } + } else { + dst.CreateWorkflowFilterUsingCustomFilterOnProfiles = nil + } + + // try to unmarshal JSON data into CreateWorkflowFilterUsingView + err = json.Unmarshal(data, &dst.CreateWorkflowFilterUsingView); + if err == nil { + jsonCreateWorkflowFilterUsingView, _ := json.Marshal(dst.CreateWorkflowFilterUsingView) + if string(jsonCreateWorkflowFilterUsingView) == "{}" { // empty struct + dst.CreateWorkflowFilterUsingView = nil + } else { + return nil // data stored in dst.CreateWorkflowFilterUsingView, return on the first match + } + } else { + dst.CreateWorkflowFilterUsingView = nil + } + + return fmt.Errorf("data failed to match schemas in anyOf(UpdateWorkflowRequestFiltersInner)") +} + +// Marshal data from the first non-nil pointers in the struct to JSON +func (src UpdateWorkflowRequestFiltersInner) MarshalJSON() ([]byte, error) { + if src.CreateWorkflowFilterUsingCustomFilterOnAssets != nil { + return json.Marshal(&src.CreateWorkflowFilterUsingCustomFilterOnAssets) + } + + if src.CreateWorkflowFilterUsingCustomFilterOnIssues != nil { + return json.Marshal(&src.CreateWorkflowFilterUsingCustomFilterOnIssues) + } + + if src.CreateWorkflowFilterUsingCustomFilterOnProfiles != nil { + return json.Marshal(&src.CreateWorkflowFilterUsingCustomFilterOnProfiles) + } + + if src.CreateWorkflowFilterUsingView != nil { + return json.Marshal(&src.CreateWorkflowFilterUsingView) + } + + return nil, nil // no data in anyOf schemas +} + + +type NullableUpdateWorkflowRequestFiltersInner struct { + value *UpdateWorkflowRequestFiltersInner + isSet bool +} + +func (v NullableUpdateWorkflowRequestFiltersInner) Get() *UpdateWorkflowRequestFiltersInner { + return v.value +} + +func (v *NullableUpdateWorkflowRequestFiltersInner) Set(val *UpdateWorkflowRequestFiltersInner) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateWorkflowRequestFiltersInner) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateWorkflowRequestFiltersInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateWorkflowRequestFiltersInner(val *UpdateWorkflowRequestFiltersInner) *NullableUpdateWorkflowRequestFiltersInner { + return &NullableUpdateWorkflowRequestFiltersInner{value: val, isSet: true} +} + +func (v NullableUpdateWorkflowRequestFiltersInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateWorkflowRequestFiltersInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_updateakamai_integration_request.go b/pkg/api/v3/model_updateakamai_integration_request.go new file mode 100644 index 00000000..62048623 --- /dev/null +++ b/pkg/api/v3/model_updateakamai_integration_request.go @@ -0,0 +1,269 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" +) + +// checks if the UpdateakamaiIntegrationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateakamaiIntegrationRequest{} + +// UpdateakamaiIntegrationRequest struct for UpdateakamaiIntegrationRequest +type UpdateakamaiIntegrationRequest struct { + // The new name of the integration + Name *string `json:"name,omitempty"` + Parameters *UpdateakamaiIntegrationRequestParameters `json:"parameters,omitempty"` + // Optional proxy ID to attach to the integration + ProxyId *string `json:"proxyId,omitempty"` + // Optional list of project IDs to attach to the integration + ProjectIds []string `json:"projectIds,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateakamaiIntegrationRequest UpdateakamaiIntegrationRequest + +// NewUpdateakamaiIntegrationRequest instantiates a new UpdateakamaiIntegrationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateakamaiIntegrationRequest() *UpdateakamaiIntegrationRequest { + this := UpdateakamaiIntegrationRequest{} + return &this +} + +// NewUpdateakamaiIntegrationRequestWithDefaults instantiates a new UpdateakamaiIntegrationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateakamaiIntegrationRequestWithDefaults() *UpdateakamaiIntegrationRequest { + this := UpdateakamaiIntegrationRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateakamaiIntegrationRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateakamaiIntegrationRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateakamaiIntegrationRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateakamaiIntegrationRequest) SetName(v string) { + o.Name = &v +} + +// GetParameters returns the Parameters field value if set, zero value otherwise. +func (o *UpdateakamaiIntegrationRequest) GetParameters() UpdateakamaiIntegrationRequestParameters { + if o == nil || IsNil(o.Parameters) { + var ret UpdateakamaiIntegrationRequestParameters + return ret + } + return *o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateakamaiIntegrationRequest) GetParametersOk() (*UpdateakamaiIntegrationRequestParameters, bool) { + if o == nil || IsNil(o.Parameters) { + return nil, false + } + return o.Parameters, true +} + +// HasParameters returns a boolean if a field has been set. +func (o *UpdateakamaiIntegrationRequest) HasParameters() bool { + if o != nil && !IsNil(o.Parameters) { + return true + } + + return false +} + +// SetParameters gets a reference to the given UpdateakamaiIntegrationRequestParameters and assigns it to the Parameters field. +func (o *UpdateakamaiIntegrationRequest) SetParameters(v UpdateakamaiIntegrationRequestParameters) { + o.Parameters = &v +} + +// GetProxyId returns the ProxyId field value if set, zero value otherwise. +func (o *UpdateakamaiIntegrationRequest) GetProxyId() string { + if o == nil || IsNil(o.ProxyId) { + var ret string + return ret + } + return *o.ProxyId +} + +// GetProxyIdOk returns a tuple with the ProxyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateakamaiIntegrationRequest) GetProxyIdOk() (*string, bool) { + if o == nil || IsNil(o.ProxyId) { + return nil, false + } + return o.ProxyId, true +} + +// HasProxyId returns a boolean if a field has been set. +func (o *UpdateakamaiIntegrationRequest) HasProxyId() bool { + if o != nil && !IsNil(o.ProxyId) { + return true + } + + return false +} + +// SetProxyId gets a reference to the given string and assigns it to the ProxyId field. +func (o *UpdateakamaiIntegrationRequest) SetProxyId(v string) { + o.ProxyId = &v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *UpdateakamaiIntegrationRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateakamaiIntegrationRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *UpdateakamaiIntegrationRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *UpdateakamaiIntegrationRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o UpdateakamaiIntegrationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateakamaiIntegrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Parameters) { + toSerialize["parameters"] = o.Parameters + } + if !IsNil(o.ProxyId) { + toSerialize["proxyId"] = o.ProxyId + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateakamaiIntegrationRequest) UnmarshalJSON(data []byte) (err error) { + varUpdateakamaiIntegrationRequest := _UpdateakamaiIntegrationRequest{} + + err = json.Unmarshal(data, &varUpdateakamaiIntegrationRequest) + + if err != nil { + return err + } + + *o = UpdateakamaiIntegrationRequest(varUpdateakamaiIntegrationRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "parameters") + delete(additionalProperties, "proxyId") + delete(additionalProperties, "projectIds") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateakamaiIntegrationRequest struct { + value *UpdateakamaiIntegrationRequest + isSet bool +} + +func (v NullableUpdateakamaiIntegrationRequest) Get() *UpdateakamaiIntegrationRequest { + return v.value +} + +func (v *NullableUpdateakamaiIntegrationRequest) Set(val *UpdateakamaiIntegrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateakamaiIntegrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateakamaiIntegrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateakamaiIntegrationRequest(val *UpdateakamaiIntegrationRequest) *NullableUpdateakamaiIntegrationRequest { + return &NullableUpdateakamaiIntegrationRequest{value: val, isSet: true} +} + +func (v NullableUpdateakamaiIntegrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateakamaiIntegrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_updateakamai_integration_request_parameters.go b/pkg/api/v3/model_updateakamai_integration_request_parameters.go new file mode 100644 index 00000000..abeae3d8 --- /dev/null +++ b/pkg/api/v3/model_updateakamai_integration_request_parameters.go @@ -0,0 +1,255 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the UpdateakamaiIntegrationRequestParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateakamaiIntegrationRequestParameters{} + +// UpdateakamaiIntegrationRequestParameters The new parameters of the integration +type UpdateakamaiIntegrationRequestParameters struct { + ClientSecret string `json:"client_secret"` + Host string `json:"host"` + AccessToken string `json:"access_token"` + ClientToken string `json:"client_token"` + AdditionalProperties map[string]interface{} +} + +type _UpdateakamaiIntegrationRequestParameters UpdateakamaiIntegrationRequestParameters + +// NewUpdateakamaiIntegrationRequestParameters instantiates a new UpdateakamaiIntegrationRequestParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateakamaiIntegrationRequestParameters(clientSecret string, host string, accessToken string, clientToken string) *UpdateakamaiIntegrationRequestParameters { + this := UpdateakamaiIntegrationRequestParameters{} + this.ClientSecret = clientSecret + this.Host = host + this.AccessToken = accessToken + this.ClientToken = clientToken + return &this +} + +// NewUpdateakamaiIntegrationRequestParametersWithDefaults instantiates a new UpdateakamaiIntegrationRequestParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateakamaiIntegrationRequestParametersWithDefaults() *UpdateakamaiIntegrationRequestParameters { + this := UpdateakamaiIntegrationRequestParameters{} + return &this +} + +// GetClientSecret returns the ClientSecret field value +func (o *UpdateakamaiIntegrationRequestParameters) GetClientSecret() string { + if o == nil { + var ret string + return ret + } + + return o.ClientSecret +} + +// GetClientSecretOk returns a tuple with the ClientSecret field value +// and a boolean to check if the value has been set. +func (o *UpdateakamaiIntegrationRequestParameters) GetClientSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientSecret, true +} + +// SetClientSecret sets field value +func (o *UpdateakamaiIntegrationRequestParameters) SetClientSecret(v string) { + o.ClientSecret = v +} + +// GetHost returns the Host field value +func (o *UpdateakamaiIntegrationRequestParameters) GetHost() string { + if o == nil { + var ret string + return ret + } + + return o.Host +} + +// GetHostOk returns a tuple with the Host field value +// and a boolean to check if the value has been set. +func (o *UpdateakamaiIntegrationRequestParameters) GetHostOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Host, true +} + +// SetHost sets field value +func (o *UpdateakamaiIntegrationRequestParameters) SetHost(v string) { + o.Host = v +} + +// GetAccessToken returns the AccessToken field value +func (o *UpdateakamaiIntegrationRequestParameters) GetAccessToken() string { + if o == nil { + var ret string + return ret + } + + return o.AccessToken +} + +// GetAccessTokenOk returns a tuple with the AccessToken field value +// and a boolean to check if the value has been set. +func (o *UpdateakamaiIntegrationRequestParameters) GetAccessTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccessToken, true +} + +// SetAccessToken sets field value +func (o *UpdateakamaiIntegrationRequestParameters) SetAccessToken(v string) { + o.AccessToken = v +} + +// GetClientToken returns the ClientToken field value +func (o *UpdateakamaiIntegrationRequestParameters) GetClientToken() string { + if o == nil { + var ret string + return ret + } + + return o.ClientToken +} + +// GetClientTokenOk returns a tuple with the ClientToken field value +// and a boolean to check if the value has been set. +func (o *UpdateakamaiIntegrationRequestParameters) GetClientTokenOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientToken, true +} + +// SetClientToken sets field value +func (o *UpdateakamaiIntegrationRequestParameters) SetClientToken(v string) { + o.ClientToken = v +} + +func (o UpdateakamaiIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateakamaiIntegrationRequestParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["client_secret"] = o.ClientSecret + toSerialize["host"] = o.Host + toSerialize["access_token"] = o.AccessToken + toSerialize["client_token"] = o.ClientToken + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateakamaiIntegrationRequestParameters) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "client_secret", + "host", + "access_token", + "client_token", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUpdateakamaiIntegrationRequestParameters := _UpdateakamaiIntegrationRequestParameters{} + + err = json.Unmarshal(data, &varUpdateakamaiIntegrationRequestParameters) + + if err != nil { + return err + } + + *o = UpdateakamaiIntegrationRequestParameters(varUpdateakamaiIntegrationRequestParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "client_secret") + delete(additionalProperties, "host") + delete(additionalProperties, "access_token") + delete(additionalProperties, "client_token") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateakamaiIntegrationRequestParameters struct { + value *UpdateakamaiIntegrationRequestParameters + isSet bool +} + +func (v NullableUpdateakamaiIntegrationRequestParameters) Get() *UpdateakamaiIntegrationRequestParameters { + return v.value +} + +func (v *NullableUpdateakamaiIntegrationRequestParameters) Set(val *UpdateakamaiIntegrationRequestParameters) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateakamaiIntegrationRequestParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateakamaiIntegrationRequestParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateakamaiIntegrationRequestParameters(val *UpdateakamaiIntegrationRequestParameters) *NullableUpdateakamaiIntegrationRequestParameters { + return &NullableUpdateakamaiIntegrationRequestParameters{value: val, isSet: true} +} + +func (v NullableUpdateakamaiIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateakamaiIntegrationRequestParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_updateapigee_integration_request.go b/pkg/api/v3/model_updateapigee_integration_request.go new file mode 100644 index 00000000..d8cc54f9 --- /dev/null +++ b/pkg/api/v3/model_updateapigee_integration_request.go @@ -0,0 +1,269 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" +) + +// checks if the UpdateapigeeIntegrationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateapigeeIntegrationRequest{} + +// UpdateapigeeIntegrationRequest struct for UpdateapigeeIntegrationRequest +type UpdateapigeeIntegrationRequest struct { + // The new name of the integration + Name *string `json:"name,omitempty"` + Parameters *UpdateapigeeIntegrationRequestParameters `json:"parameters,omitempty"` + // Optional proxy ID to attach to the integration + ProxyId *string `json:"proxyId,omitempty"` + // Optional list of project IDs to attach to the integration + ProjectIds []string `json:"projectIds,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateapigeeIntegrationRequest UpdateapigeeIntegrationRequest + +// NewUpdateapigeeIntegrationRequest instantiates a new UpdateapigeeIntegrationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateapigeeIntegrationRequest() *UpdateapigeeIntegrationRequest { + this := UpdateapigeeIntegrationRequest{} + return &this +} + +// NewUpdateapigeeIntegrationRequestWithDefaults instantiates a new UpdateapigeeIntegrationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateapigeeIntegrationRequestWithDefaults() *UpdateapigeeIntegrationRequest { + this := UpdateapigeeIntegrationRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateapigeeIntegrationRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateapigeeIntegrationRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateapigeeIntegrationRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateapigeeIntegrationRequest) SetName(v string) { + o.Name = &v +} + +// GetParameters returns the Parameters field value if set, zero value otherwise. +func (o *UpdateapigeeIntegrationRequest) GetParameters() UpdateapigeeIntegrationRequestParameters { + if o == nil || IsNil(o.Parameters) { + var ret UpdateapigeeIntegrationRequestParameters + return ret + } + return *o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateapigeeIntegrationRequest) GetParametersOk() (*UpdateapigeeIntegrationRequestParameters, bool) { + if o == nil || IsNil(o.Parameters) { + return nil, false + } + return o.Parameters, true +} + +// HasParameters returns a boolean if a field has been set. +func (o *UpdateapigeeIntegrationRequest) HasParameters() bool { + if o != nil && !IsNil(o.Parameters) { + return true + } + + return false +} + +// SetParameters gets a reference to the given UpdateapigeeIntegrationRequestParameters and assigns it to the Parameters field. +func (o *UpdateapigeeIntegrationRequest) SetParameters(v UpdateapigeeIntegrationRequestParameters) { + o.Parameters = &v +} + +// GetProxyId returns the ProxyId field value if set, zero value otherwise. +func (o *UpdateapigeeIntegrationRequest) GetProxyId() string { + if o == nil || IsNil(o.ProxyId) { + var ret string + return ret + } + return *o.ProxyId +} + +// GetProxyIdOk returns a tuple with the ProxyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateapigeeIntegrationRequest) GetProxyIdOk() (*string, bool) { + if o == nil || IsNil(o.ProxyId) { + return nil, false + } + return o.ProxyId, true +} + +// HasProxyId returns a boolean if a field has been set. +func (o *UpdateapigeeIntegrationRequest) HasProxyId() bool { + if o != nil && !IsNil(o.ProxyId) { + return true + } + + return false +} + +// SetProxyId gets a reference to the given string and assigns it to the ProxyId field. +func (o *UpdateapigeeIntegrationRequest) SetProxyId(v string) { + o.ProxyId = &v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *UpdateapigeeIntegrationRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateapigeeIntegrationRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *UpdateapigeeIntegrationRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *UpdateapigeeIntegrationRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o UpdateapigeeIntegrationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateapigeeIntegrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Parameters) { + toSerialize["parameters"] = o.Parameters + } + if !IsNil(o.ProxyId) { + toSerialize["proxyId"] = o.ProxyId + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateapigeeIntegrationRequest) UnmarshalJSON(data []byte) (err error) { + varUpdateapigeeIntegrationRequest := _UpdateapigeeIntegrationRequest{} + + err = json.Unmarshal(data, &varUpdateapigeeIntegrationRequest) + + if err != nil { + return err + } + + *o = UpdateapigeeIntegrationRequest(varUpdateapigeeIntegrationRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "parameters") + delete(additionalProperties, "proxyId") + delete(additionalProperties, "projectIds") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateapigeeIntegrationRequest struct { + value *UpdateapigeeIntegrationRequest + isSet bool +} + +func (v NullableUpdateapigeeIntegrationRequest) Get() *UpdateapigeeIntegrationRequest { + return v.value +} + +func (v *NullableUpdateapigeeIntegrationRequest) Set(val *UpdateapigeeIntegrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateapigeeIntegrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateapigeeIntegrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateapigeeIntegrationRequest(val *UpdateapigeeIntegrationRequest) *NullableUpdateapigeeIntegrationRequest { + return &NullableUpdateapigeeIntegrationRequest{value: val, isSet: true} +} + +func (v NullableUpdateapigeeIntegrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateapigeeIntegrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_updateapigee_integration_request_parameters.go b/pkg/api/v3/model_updateapigee_integration_request_parameters.go new file mode 100644 index 00000000..2e04b30b --- /dev/null +++ b/pkg/api/v3/model_updateapigee_integration_request_parameters.go @@ -0,0 +1,458 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the UpdateapigeeIntegrationRequestParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateapigeeIntegrationRequestParameters{} + +// UpdateapigeeIntegrationRequestParameters The new parameters of the integration +type UpdateapigeeIntegrationRequestParameters struct { + AuthProviderX509CertUrl string `json:"auth_provider_x509_cert_url"` + AuthUri string `json:"auth_uri"` + ClientEmail string `json:"client_email"` + ClientId string `json:"client_id"` + ClientX509CertUrl string `json:"client_x509_cert_url"` + PrivateKey string `json:"private_key"` + PrivateKeyId string `json:"private_key_id"` + ProjectId string `json:"project_id"` + TokenUri string `json:"token_uri"` + Type string `json:"type"` + UniverseDomain string `json:"universe_domain"` + AdditionalProperties map[string]interface{} +} + +type _UpdateapigeeIntegrationRequestParameters UpdateapigeeIntegrationRequestParameters + +// NewUpdateapigeeIntegrationRequestParameters instantiates a new UpdateapigeeIntegrationRequestParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateapigeeIntegrationRequestParameters(authProviderX509CertUrl string, authUri string, clientEmail string, clientId string, clientX509CertUrl string, privateKey string, privateKeyId string, projectId string, tokenUri string, type_ string, universeDomain string) *UpdateapigeeIntegrationRequestParameters { + this := UpdateapigeeIntegrationRequestParameters{} + this.AuthProviderX509CertUrl = authProviderX509CertUrl + this.AuthUri = authUri + this.ClientEmail = clientEmail + this.ClientId = clientId + this.ClientX509CertUrl = clientX509CertUrl + this.PrivateKey = privateKey + this.PrivateKeyId = privateKeyId + this.ProjectId = projectId + this.TokenUri = tokenUri + this.Type = type_ + this.UniverseDomain = universeDomain + return &this +} + +// NewUpdateapigeeIntegrationRequestParametersWithDefaults instantiates a new UpdateapigeeIntegrationRequestParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateapigeeIntegrationRequestParametersWithDefaults() *UpdateapigeeIntegrationRequestParameters { + this := UpdateapigeeIntegrationRequestParameters{} + return &this +} + +// GetAuthProviderX509CertUrl returns the AuthProviderX509CertUrl field value +func (o *UpdateapigeeIntegrationRequestParameters) GetAuthProviderX509CertUrl() string { + if o == nil { + var ret string + return ret + } + + return o.AuthProviderX509CertUrl +} + +// GetAuthProviderX509CertUrlOk returns a tuple with the AuthProviderX509CertUrl field value +// and a boolean to check if the value has been set. +func (o *UpdateapigeeIntegrationRequestParameters) GetAuthProviderX509CertUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AuthProviderX509CertUrl, true +} + +// SetAuthProviderX509CertUrl sets field value +func (o *UpdateapigeeIntegrationRequestParameters) SetAuthProviderX509CertUrl(v string) { + o.AuthProviderX509CertUrl = v +} + +// GetAuthUri returns the AuthUri field value +func (o *UpdateapigeeIntegrationRequestParameters) GetAuthUri() string { + if o == nil { + var ret string + return ret + } + + return o.AuthUri +} + +// GetAuthUriOk returns a tuple with the AuthUri field value +// and a boolean to check if the value has been set. +func (o *UpdateapigeeIntegrationRequestParameters) GetAuthUriOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AuthUri, true +} + +// SetAuthUri sets field value +func (o *UpdateapigeeIntegrationRequestParameters) SetAuthUri(v string) { + o.AuthUri = v +} + +// GetClientEmail returns the ClientEmail field value +func (o *UpdateapigeeIntegrationRequestParameters) GetClientEmail() string { + if o == nil { + var ret string + return ret + } + + return o.ClientEmail +} + +// GetClientEmailOk returns a tuple with the ClientEmail field value +// and a boolean to check if the value has been set. +func (o *UpdateapigeeIntegrationRequestParameters) GetClientEmailOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientEmail, true +} + +// SetClientEmail sets field value +func (o *UpdateapigeeIntegrationRequestParameters) SetClientEmail(v string) { + o.ClientEmail = v +} + +// GetClientId returns the ClientId field value +func (o *UpdateapigeeIntegrationRequestParameters) GetClientId() string { + if o == nil { + var ret string + return ret + } + + return o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value +// and a boolean to check if the value has been set. +func (o *UpdateapigeeIntegrationRequestParameters) GetClientIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientId, true +} + +// SetClientId sets field value +func (o *UpdateapigeeIntegrationRequestParameters) SetClientId(v string) { + o.ClientId = v +} + +// GetClientX509CertUrl returns the ClientX509CertUrl field value +func (o *UpdateapigeeIntegrationRequestParameters) GetClientX509CertUrl() string { + if o == nil { + var ret string + return ret + } + + return o.ClientX509CertUrl +} + +// GetClientX509CertUrlOk returns a tuple with the ClientX509CertUrl field value +// and a boolean to check if the value has been set. +func (o *UpdateapigeeIntegrationRequestParameters) GetClientX509CertUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientX509CertUrl, true +} + +// SetClientX509CertUrl sets field value +func (o *UpdateapigeeIntegrationRequestParameters) SetClientX509CertUrl(v string) { + o.ClientX509CertUrl = v +} + +// GetPrivateKey returns the PrivateKey field value +func (o *UpdateapigeeIntegrationRequestParameters) GetPrivateKey() string { + if o == nil { + var ret string + return ret + } + + return o.PrivateKey +} + +// GetPrivateKeyOk returns a tuple with the PrivateKey field value +// and a boolean to check if the value has been set. +func (o *UpdateapigeeIntegrationRequestParameters) GetPrivateKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PrivateKey, true +} + +// SetPrivateKey sets field value +func (o *UpdateapigeeIntegrationRequestParameters) SetPrivateKey(v string) { + o.PrivateKey = v +} + +// GetPrivateKeyId returns the PrivateKeyId field value +func (o *UpdateapigeeIntegrationRequestParameters) GetPrivateKeyId() string { + if o == nil { + var ret string + return ret + } + + return o.PrivateKeyId +} + +// GetPrivateKeyIdOk returns a tuple with the PrivateKeyId field value +// and a boolean to check if the value has been set. +func (o *UpdateapigeeIntegrationRequestParameters) GetPrivateKeyIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PrivateKeyId, true +} + +// SetPrivateKeyId sets field value +func (o *UpdateapigeeIntegrationRequestParameters) SetPrivateKeyId(v string) { + o.PrivateKeyId = v +} + +// GetProjectId returns the ProjectId field value +func (o *UpdateapigeeIntegrationRequestParameters) GetProjectId() string { + if o == nil { + var ret string + return ret + } + + return o.ProjectId +} + +// GetProjectIdOk returns a tuple with the ProjectId field value +// and a boolean to check if the value has been set. +func (o *UpdateapigeeIntegrationRequestParameters) GetProjectIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ProjectId, true +} + +// SetProjectId sets field value +func (o *UpdateapigeeIntegrationRequestParameters) SetProjectId(v string) { + o.ProjectId = v +} + +// GetTokenUri returns the TokenUri field value +func (o *UpdateapigeeIntegrationRequestParameters) GetTokenUri() string { + if o == nil { + var ret string + return ret + } + + return o.TokenUri +} + +// GetTokenUriOk returns a tuple with the TokenUri field value +// and a boolean to check if the value has been set. +func (o *UpdateapigeeIntegrationRequestParameters) GetTokenUriOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TokenUri, true +} + +// SetTokenUri sets field value +func (o *UpdateapigeeIntegrationRequestParameters) SetTokenUri(v string) { + o.TokenUri = v +} + +// GetType returns the Type field value +func (o *UpdateapigeeIntegrationRequestParameters) GetType() string { + if o == nil { + var ret string + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *UpdateapigeeIntegrationRequestParameters) GetTypeOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *UpdateapigeeIntegrationRequestParameters) SetType(v string) { + o.Type = v +} + +// GetUniverseDomain returns the UniverseDomain field value +func (o *UpdateapigeeIntegrationRequestParameters) GetUniverseDomain() string { + if o == nil { + var ret string + return ret + } + + return o.UniverseDomain +} + +// GetUniverseDomainOk returns a tuple with the UniverseDomain field value +// and a boolean to check if the value has been set. +func (o *UpdateapigeeIntegrationRequestParameters) GetUniverseDomainOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.UniverseDomain, true +} + +// SetUniverseDomain sets field value +func (o *UpdateapigeeIntegrationRequestParameters) SetUniverseDomain(v string) { + o.UniverseDomain = v +} + +func (o UpdateapigeeIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateapigeeIntegrationRequestParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["auth_provider_x509_cert_url"] = o.AuthProviderX509CertUrl + toSerialize["auth_uri"] = o.AuthUri + toSerialize["client_email"] = o.ClientEmail + toSerialize["client_id"] = o.ClientId + toSerialize["client_x509_cert_url"] = o.ClientX509CertUrl + toSerialize["private_key"] = o.PrivateKey + toSerialize["private_key_id"] = o.PrivateKeyId + toSerialize["project_id"] = o.ProjectId + toSerialize["token_uri"] = o.TokenUri + toSerialize["type"] = o.Type + toSerialize["universe_domain"] = o.UniverseDomain + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateapigeeIntegrationRequestParameters) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "auth_provider_x509_cert_url", + "auth_uri", + "client_email", + "client_id", + "client_x509_cert_url", + "private_key", + "private_key_id", + "project_id", + "token_uri", + "type", + "universe_domain", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUpdateapigeeIntegrationRequestParameters := _UpdateapigeeIntegrationRequestParameters{} + + err = json.Unmarshal(data, &varUpdateapigeeIntegrationRequestParameters) + + if err != nil { + return err + } + + *o = UpdateapigeeIntegrationRequestParameters(varUpdateapigeeIntegrationRequestParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "auth_provider_x509_cert_url") + delete(additionalProperties, "auth_uri") + delete(additionalProperties, "client_email") + delete(additionalProperties, "client_id") + delete(additionalProperties, "client_x509_cert_url") + delete(additionalProperties, "private_key") + delete(additionalProperties, "private_key_id") + delete(additionalProperties, "project_id") + delete(additionalProperties, "token_uri") + delete(additionalProperties, "type") + delete(additionalProperties, "universe_domain") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateapigeeIntegrationRequestParameters struct { + value *UpdateapigeeIntegrationRequestParameters + isSet bool +} + +func (v NullableUpdateapigeeIntegrationRequestParameters) Get() *UpdateapigeeIntegrationRequestParameters { + return v.value +} + +func (v *NullableUpdateapigeeIntegrationRequestParameters) Set(val *UpdateapigeeIntegrationRequestParameters) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateapigeeIntegrationRequestParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateapigeeIntegrationRequestParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateapigeeIntegrationRequestParameters(val *UpdateapigeeIntegrationRequestParameters) *NullableUpdateapigeeIntegrationRequestParameters { + return &NullableUpdateapigeeIntegrationRequestParameters{value: val, isSet: true} +} + +func (v NullableUpdateapigeeIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateapigeeIntegrationRequestParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_updateaws_integration_request.go b/pkg/api/v3/model_updateaws_integration_request.go new file mode 100644 index 00000000..ee4314ec --- /dev/null +++ b/pkg/api/v3/model_updateaws_integration_request.go @@ -0,0 +1,269 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" +) + +// checks if the UpdateawsIntegrationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateawsIntegrationRequest{} + +// UpdateawsIntegrationRequest struct for UpdateawsIntegrationRequest +type UpdateawsIntegrationRequest struct { + // The new name of the integration + Name *string `json:"name,omitempty"` + Parameters *UpdateawsIntegrationRequestParameters `json:"parameters,omitempty"` + // Optional proxy ID to attach to the integration + ProxyId *string `json:"proxyId,omitempty"` + // Optional list of project IDs to attach to the integration + ProjectIds []string `json:"projectIds,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateawsIntegrationRequest UpdateawsIntegrationRequest + +// NewUpdateawsIntegrationRequest instantiates a new UpdateawsIntegrationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateawsIntegrationRequest() *UpdateawsIntegrationRequest { + this := UpdateawsIntegrationRequest{} + return &this +} + +// NewUpdateawsIntegrationRequestWithDefaults instantiates a new UpdateawsIntegrationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateawsIntegrationRequestWithDefaults() *UpdateawsIntegrationRequest { + this := UpdateawsIntegrationRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateawsIntegrationRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateawsIntegrationRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateawsIntegrationRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateawsIntegrationRequest) SetName(v string) { + o.Name = &v +} + +// GetParameters returns the Parameters field value if set, zero value otherwise. +func (o *UpdateawsIntegrationRequest) GetParameters() UpdateawsIntegrationRequestParameters { + if o == nil || IsNil(o.Parameters) { + var ret UpdateawsIntegrationRequestParameters + return ret + } + return *o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateawsIntegrationRequest) GetParametersOk() (*UpdateawsIntegrationRequestParameters, bool) { + if o == nil || IsNil(o.Parameters) { + return nil, false + } + return o.Parameters, true +} + +// HasParameters returns a boolean if a field has been set. +func (o *UpdateawsIntegrationRequest) HasParameters() bool { + if o != nil && !IsNil(o.Parameters) { + return true + } + + return false +} + +// SetParameters gets a reference to the given UpdateawsIntegrationRequestParameters and assigns it to the Parameters field. +func (o *UpdateawsIntegrationRequest) SetParameters(v UpdateawsIntegrationRequestParameters) { + o.Parameters = &v +} + +// GetProxyId returns the ProxyId field value if set, zero value otherwise. +func (o *UpdateawsIntegrationRequest) GetProxyId() string { + if o == nil || IsNil(o.ProxyId) { + var ret string + return ret + } + return *o.ProxyId +} + +// GetProxyIdOk returns a tuple with the ProxyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateawsIntegrationRequest) GetProxyIdOk() (*string, bool) { + if o == nil || IsNil(o.ProxyId) { + return nil, false + } + return o.ProxyId, true +} + +// HasProxyId returns a boolean if a field has been set. +func (o *UpdateawsIntegrationRequest) HasProxyId() bool { + if o != nil && !IsNil(o.ProxyId) { + return true + } + + return false +} + +// SetProxyId gets a reference to the given string and assigns it to the ProxyId field. +func (o *UpdateawsIntegrationRequest) SetProxyId(v string) { + o.ProxyId = &v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *UpdateawsIntegrationRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateawsIntegrationRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *UpdateawsIntegrationRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *UpdateawsIntegrationRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o UpdateawsIntegrationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateawsIntegrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Parameters) { + toSerialize["parameters"] = o.Parameters + } + if !IsNil(o.ProxyId) { + toSerialize["proxyId"] = o.ProxyId + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateawsIntegrationRequest) UnmarshalJSON(data []byte) (err error) { + varUpdateawsIntegrationRequest := _UpdateawsIntegrationRequest{} + + err = json.Unmarshal(data, &varUpdateawsIntegrationRequest) + + if err != nil { + return err + } + + *o = UpdateawsIntegrationRequest(varUpdateawsIntegrationRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "parameters") + delete(additionalProperties, "proxyId") + delete(additionalProperties, "projectIds") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateawsIntegrationRequest struct { + value *UpdateawsIntegrationRequest + isSet bool +} + +func (v NullableUpdateawsIntegrationRequest) Get() *UpdateawsIntegrationRequest { + return v.value +} + +func (v *NullableUpdateawsIntegrationRequest) Set(val *UpdateawsIntegrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateawsIntegrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateawsIntegrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateawsIntegrationRequest(val *UpdateawsIntegrationRequest) *NullableUpdateawsIntegrationRequest { + return &NullableUpdateawsIntegrationRequest{value: val, isSet: true} +} + +func (v NullableUpdateawsIntegrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateawsIntegrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_updateaws_integration_request_parameters.go b/pkg/api/v3/model_updateaws_integration_request_parameters.go new file mode 100644 index 00000000..c80226d5 --- /dev/null +++ b/pkg/api/v3/model_updateaws_integration_request_parameters.go @@ -0,0 +1,234 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the UpdateawsIntegrationRequestParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateawsIntegrationRequestParameters{} + +// UpdateawsIntegrationRequestParameters The new parameters of the integration +type UpdateawsIntegrationRequestParameters struct { + PublicKey string `json:"public_key"` + PrivateKey string `json:"private_key"` + ExternalIntegrationRoleArn *string `json:"external_integration_role_arn,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateawsIntegrationRequestParameters UpdateawsIntegrationRequestParameters + +// NewUpdateawsIntegrationRequestParameters instantiates a new UpdateawsIntegrationRequestParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateawsIntegrationRequestParameters(publicKey string, privateKey string) *UpdateawsIntegrationRequestParameters { + this := UpdateawsIntegrationRequestParameters{} + this.PublicKey = publicKey + this.PrivateKey = privateKey + return &this +} + +// NewUpdateawsIntegrationRequestParametersWithDefaults instantiates a new UpdateawsIntegrationRequestParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateawsIntegrationRequestParametersWithDefaults() *UpdateawsIntegrationRequestParameters { + this := UpdateawsIntegrationRequestParameters{} + return &this +} + +// GetPublicKey returns the PublicKey field value +func (o *UpdateawsIntegrationRequestParameters) GetPublicKey() string { + if o == nil { + var ret string + return ret + } + + return o.PublicKey +} + +// GetPublicKeyOk returns a tuple with the PublicKey field value +// and a boolean to check if the value has been set. +func (o *UpdateawsIntegrationRequestParameters) GetPublicKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PublicKey, true +} + +// SetPublicKey sets field value +func (o *UpdateawsIntegrationRequestParameters) SetPublicKey(v string) { + o.PublicKey = v +} + +// GetPrivateKey returns the PrivateKey field value +func (o *UpdateawsIntegrationRequestParameters) GetPrivateKey() string { + if o == nil { + var ret string + return ret + } + + return o.PrivateKey +} + +// GetPrivateKeyOk returns a tuple with the PrivateKey field value +// and a boolean to check if the value has been set. +func (o *UpdateawsIntegrationRequestParameters) GetPrivateKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.PrivateKey, true +} + +// SetPrivateKey sets field value +func (o *UpdateawsIntegrationRequestParameters) SetPrivateKey(v string) { + o.PrivateKey = v +} + +// GetExternalIntegrationRoleArn returns the ExternalIntegrationRoleArn field value if set, zero value otherwise. +func (o *UpdateawsIntegrationRequestParameters) GetExternalIntegrationRoleArn() string { + if o == nil || IsNil(o.ExternalIntegrationRoleArn) { + var ret string + return ret + } + return *o.ExternalIntegrationRoleArn +} + +// GetExternalIntegrationRoleArnOk returns a tuple with the ExternalIntegrationRoleArn field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateawsIntegrationRequestParameters) GetExternalIntegrationRoleArnOk() (*string, bool) { + if o == nil || IsNil(o.ExternalIntegrationRoleArn) { + return nil, false + } + return o.ExternalIntegrationRoleArn, true +} + +// HasExternalIntegrationRoleArn returns a boolean if a field has been set. +func (o *UpdateawsIntegrationRequestParameters) HasExternalIntegrationRoleArn() bool { + if o != nil && !IsNil(o.ExternalIntegrationRoleArn) { + return true + } + + return false +} + +// SetExternalIntegrationRoleArn gets a reference to the given string and assigns it to the ExternalIntegrationRoleArn field. +func (o *UpdateawsIntegrationRequestParameters) SetExternalIntegrationRoleArn(v string) { + o.ExternalIntegrationRoleArn = &v +} + +func (o UpdateawsIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateawsIntegrationRequestParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["public_key"] = o.PublicKey + toSerialize["private_key"] = o.PrivateKey + if !IsNil(o.ExternalIntegrationRoleArn) { + toSerialize["external_integration_role_arn"] = o.ExternalIntegrationRoleArn + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateawsIntegrationRequestParameters) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "public_key", + "private_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUpdateawsIntegrationRequestParameters := _UpdateawsIntegrationRequestParameters{} + + err = json.Unmarshal(data, &varUpdateawsIntegrationRequestParameters) + + if err != nil { + return err + } + + *o = UpdateawsIntegrationRequestParameters(varUpdateawsIntegrationRequestParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "public_key") + delete(additionalProperties, "private_key") + delete(additionalProperties, "external_integration_role_arn") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateawsIntegrationRequestParameters struct { + value *UpdateawsIntegrationRequestParameters + isSet bool +} + +func (v NullableUpdateawsIntegrationRequestParameters) Get() *UpdateawsIntegrationRequestParameters { + return v.value +} + +func (v *NullableUpdateawsIntegrationRequestParameters) Set(val *UpdateawsIntegrationRequestParameters) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateawsIntegrationRequestParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateawsIntegrationRequestParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateawsIntegrationRequestParameters(val *UpdateawsIntegrationRequestParameters) *NullableUpdateawsIntegrationRequestParameters { + return &NullableUpdateawsIntegrationRequestParameters{value: val, isSet: true} +} + +func (v NullableUpdateawsIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateawsIntegrationRequestParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_updateazure_integration_request.go b/pkg/api/v3/model_updateazure_integration_request.go new file mode 100644 index 00000000..f3ded6a0 --- /dev/null +++ b/pkg/api/v3/model_updateazure_integration_request.go @@ -0,0 +1,269 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" +) + +// checks if the UpdateazureIntegrationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateazureIntegrationRequest{} + +// UpdateazureIntegrationRequest struct for UpdateazureIntegrationRequest +type UpdateazureIntegrationRequest struct { + // The new name of the integration + Name *string `json:"name,omitempty"` + Parameters *UpdateazureIntegrationRequestParameters `json:"parameters,omitempty"` + // Optional proxy ID to attach to the integration + ProxyId *string `json:"proxyId,omitempty"` + // Optional list of project IDs to attach to the integration + ProjectIds []string `json:"projectIds,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateazureIntegrationRequest UpdateazureIntegrationRequest + +// NewUpdateazureIntegrationRequest instantiates a new UpdateazureIntegrationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateazureIntegrationRequest() *UpdateazureIntegrationRequest { + this := UpdateazureIntegrationRequest{} + return &this +} + +// NewUpdateazureIntegrationRequestWithDefaults instantiates a new UpdateazureIntegrationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateazureIntegrationRequestWithDefaults() *UpdateazureIntegrationRequest { + this := UpdateazureIntegrationRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdateazureIntegrationRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateazureIntegrationRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdateazureIntegrationRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdateazureIntegrationRequest) SetName(v string) { + o.Name = &v +} + +// GetParameters returns the Parameters field value if set, zero value otherwise. +func (o *UpdateazureIntegrationRequest) GetParameters() UpdateazureIntegrationRequestParameters { + if o == nil || IsNil(o.Parameters) { + var ret UpdateazureIntegrationRequestParameters + return ret + } + return *o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateazureIntegrationRequest) GetParametersOk() (*UpdateazureIntegrationRequestParameters, bool) { + if o == nil || IsNil(o.Parameters) { + return nil, false + } + return o.Parameters, true +} + +// HasParameters returns a boolean if a field has been set. +func (o *UpdateazureIntegrationRequest) HasParameters() bool { + if o != nil && !IsNil(o.Parameters) { + return true + } + + return false +} + +// SetParameters gets a reference to the given UpdateazureIntegrationRequestParameters and assigns it to the Parameters field. +func (o *UpdateazureIntegrationRequest) SetParameters(v UpdateazureIntegrationRequestParameters) { + o.Parameters = &v +} + +// GetProxyId returns the ProxyId field value if set, zero value otherwise. +func (o *UpdateazureIntegrationRequest) GetProxyId() string { + if o == nil || IsNil(o.ProxyId) { + var ret string + return ret + } + return *o.ProxyId +} + +// GetProxyIdOk returns a tuple with the ProxyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateazureIntegrationRequest) GetProxyIdOk() (*string, bool) { + if o == nil || IsNil(o.ProxyId) { + return nil, false + } + return o.ProxyId, true +} + +// HasProxyId returns a boolean if a field has been set. +func (o *UpdateazureIntegrationRequest) HasProxyId() bool { + if o != nil && !IsNil(o.ProxyId) { + return true + } + + return false +} + +// SetProxyId gets a reference to the given string and assigns it to the ProxyId field. +func (o *UpdateazureIntegrationRequest) SetProxyId(v string) { + o.ProxyId = &v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *UpdateazureIntegrationRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateazureIntegrationRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *UpdateazureIntegrationRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *UpdateazureIntegrationRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o UpdateazureIntegrationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateazureIntegrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Parameters) { + toSerialize["parameters"] = o.Parameters + } + if !IsNil(o.ProxyId) { + toSerialize["proxyId"] = o.ProxyId + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateazureIntegrationRequest) UnmarshalJSON(data []byte) (err error) { + varUpdateazureIntegrationRequest := _UpdateazureIntegrationRequest{} + + err = json.Unmarshal(data, &varUpdateazureIntegrationRequest) + + if err != nil { + return err + } + + *o = UpdateazureIntegrationRequest(varUpdateazureIntegrationRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "parameters") + delete(additionalProperties, "proxyId") + delete(additionalProperties, "projectIds") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateazureIntegrationRequest struct { + value *UpdateazureIntegrationRequest + isSet bool +} + +func (v NullableUpdateazureIntegrationRequest) Get() *UpdateazureIntegrationRequest { + return v.value +} + +func (v *NullableUpdateazureIntegrationRequest) Set(val *UpdateazureIntegrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateazureIntegrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateazureIntegrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateazureIntegrationRequest(val *UpdateazureIntegrationRequest) *NullableUpdateazureIntegrationRequest { + return &NullableUpdateazureIntegrationRequest{value: val, isSet: true} +} + +func (v NullableUpdateazureIntegrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateazureIntegrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_updateazure_integration_request_parameters.go b/pkg/api/v3/model_updateazure_integration_request_parameters.go new file mode 100644 index 00000000..e5cc850f --- /dev/null +++ b/pkg/api/v3/model_updateazure_integration_request_parameters.go @@ -0,0 +1,263 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the UpdateazureIntegrationRequestParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdateazureIntegrationRequestParameters{} + +// UpdateazureIntegrationRequestParameters The new parameters of the integration +type UpdateazureIntegrationRequestParameters struct { + ClientId string `json:"client_id"` + ClientSecret string `json:"client_secret"` + TenantId string `json:"tenant_id"` + SubscriptionId *string `json:"subscription_id,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdateazureIntegrationRequestParameters UpdateazureIntegrationRequestParameters + +// NewUpdateazureIntegrationRequestParameters instantiates a new UpdateazureIntegrationRequestParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdateazureIntegrationRequestParameters(clientId string, clientSecret string, tenantId string) *UpdateazureIntegrationRequestParameters { + this := UpdateazureIntegrationRequestParameters{} + this.ClientId = clientId + this.ClientSecret = clientSecret + this.TenantId = tenantId + return &this +} + +// NewUpdateazureIntegrationRequestParametersWithDefaults instantiates a new UpdateazureIntegrationRequestParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdateazureIntegrationRequestParametersWithDefaults() *UpdateazureIntegrationRequestParameters { + this := UpdateazureIntegrationRequestParameters{} + return &this +} + +// GetClientId returns the ClientId field value +func (o *UpdateazureIntegrationRequestParameters) GetClientId() string { + if o == nil { + var ret string + return ret + } + + return o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value +// and a boolean to check if the value has been set. +func (o *UpdateazureIntegrationRequestParameters) GetClientIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientId, true +} + +// SetClientId sets field value +func (o *UpdateazureIntegrationRequestParameters) SetClientId(v string) { + o.ClientId = v +} + +// GetClientSecret returns the ClientSecret field value +func (o *UpdateazureIntegrationRequestParameters) GetClientSecret() string { + if o == nil { + var ret string + return ret + } + + return o.ClientSecret +} + +// GetClientSecretOk returns a tuple with the ClientSecret field value +// and a boolean to check if the value has been set. +func (o *UpdateazureIntegrationRequestParameters) GetClientSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientSecret, true +} + +// SetClientSecret sets field value +func (o *UpdateazureIntegrationRequestParameters) SetClientSecret(v string) { + o.ClientSecret = v +} + +// GetTenantId returns the TenantId field value +func (o *UpdateazureIntegrationRequestParameters) GetTenantId() string { + if o == nil { + var ret string + return ret + } + + return o.TenantId +} + +// GetTenantIdOk returns a tuple with the TenantId field value +// and a boolean to check if the value has been set. +func (o *UpdateazureIntegrationRequestParameters) GetTenantIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TenantId, true +} + +// SetTenantId sets field value +func (o *UpdateazureIntegrationRequestParameters) SetTenantId(v string) { + o.TenantId = v +} + +// GetSubscriptionId returns the SubscriptionId field value if set, zero value otherwise. +func (o *UpdateazureIntegrationRequestParameters) GetSubscriptionId() string { + if o == nil || IsNil(o.SubscriptionId) { + var ret string + return ret + } + return *o.SubscriptionId +} + +// GetSubscriptionIdOk returns a tuple with the SubscriptionId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdateazureIntegrationRequestParameters) GetSubscriptionIdOk() (*string, bool) { + if o == nil || IsNil(o.SubscriptionId) { + return nil, false + } + return o.SubscriptionId, true +} + +// HasSubscriptionId returns a boolean if a field has been set. +func (o *UpdateazureIntegrationRequestParameters) HasSubscriptionId() bool { + if o != nil && !IsNil(o.SubscriptionId) { + return true + } + + return false +} + +// SetSubscriptionId gets a reference to the given string and assigns it to the SubscriptionId field. +func (o *UpdateazureIntegrationRequestParameters) SetSubscriptionId(v string) { + o.SubscriptionId = &v +} + +func (o UpdateazureIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdateazureIntegrationRequestParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["client_id"] = o.ClientId + toSerialize["client_secret"] = o.ClientSecret + toSerialize["tenant_id"] = o.TenantId + if !IsNil(o.SubscriptionId) { + toSerialize["subscription_id"] = o.SubscriptionId + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdateazureIntegrationRequestParameters) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "client_id", + "client_secret", + "tenant_id", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUpdateazureIntegrationRequestParameters := _UpdateazureIntegrationRequestParameters{} + + err = json.Unmarshal(data, &varUpdateazureIntegrationRequestParameters) + + if err != nil { + return err + } + + *o = UpdateazureIntegrationRequestParameters(varUpdateazureIntegrationRequestParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "client_id") + delete(additionalProperties, "client_secret") + delete(additionalProperties, "tenant_id") + delete(additionalProperties, "subscription_id") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdateazureIntegrationRequestParameters struct { + value *UpdateazureIntegrationRequestParameters + isSet bool +} + +func (v NullableUpdateazureIntegrationRequestParameters) Get() *UpdateazureIntegrationRequestParameters { + return v.value +} + +func (v *NullableUpdateazureIntegrationRequestParameters) Set(val *UpdateazureIntegrationRequestParameters) { + v.value = val + v.isSet = true +} + +func (v NullableUpdateazureIntegrationRequestParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdateazureIntegrationRequestParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdateazureIntegrationRequestParameters(val *UpdateazureIntegrationRequestParameters) *NullableUpdateazureIntegrationRequestParameters { + return &NullableUpdateazureIntegrationRequestParameters{value: val, isSet: true} +} + +func (v NullableUpdateazureIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdateazureIntegrationRequestParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_updatebitbucket_repo_integration_request.go b/pkg/api/v3/model_updatebitbucket_repo_integration_request.go new file mode 100644 index 00000000..7d0e6208 --- /dev/null +++ b/pkg/api/v3/model_updatebitbucket_repo_integration_request.go @@ -0,0 +1,269 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" +) + +// checks if the UpdatebitbucketRepoIntegrationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdatebitbucketRepoIntegrationRequest{} + +// UpdatebitbucketRepoIntegrationRequest struct for UpdatebitbucketRepoIntegrationRequest +type UpdatebitbucketRepoIntegrationRequest struct { + // The new name of the integration + Name *string `json:"name,omitempty"` + Parameters *UpdatebitbucketRepoIntegrationRequestParameters `json:"parameters,omitempty"` + // Optional proxy ID to attach to the integration + ProxyId *string `json:"proxyId,omitempty"` + // Optional list of project IDs to attach to the integration + ProjectIds []string `json:"projectIds,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdatebitbucketRepoIntegrationRequest UpdatebitbucketRepoIntegrationRequest + +// NewUpdatebitbucketRepoIntegrationRequest instantiates a new UpdatebitbucketRepoIntegrationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdatebitbucketRepoIntegrationRequest() *UpdatebitbucketRepoIntegrationRequest { + this := UpdatebitbucketRepoIntegrationRequest{} + return &this +} + +// NewUpdatebitbucketRepoIntegrationRequestWithDefaults instantiates a new UpdatebitbucketRepoIntegrationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdatebitbucketRepoIntegrationRequestWithDefaults() *UpdatebitbucketRepoIntegrationRequest { + this := UpdatebitbucketRepoIntegrationRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdatebitbucketRepoIntegrationRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatebitbucketRepoIntegrationRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdatebitbucketRepoIntegrationRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdatebitbucketRepoIntegrationRequest) SetName(v string) { + o.Name = &v +} + +// GetParameters returns the Parameters field value if set, zero value otherwise. +func (o *UpdatebitbucketRepoIntegrationRequest) GetParameters() UpdatebitbucketRepoIntegrationRequestParameters { + if o == nil || IsNil(o.Parameters) { + var ret UpdatebitbucketRepoIntegrationRequestParameters + return ret + } + return *o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatebitbucketRepoIntegrationRequest) GetParametersOk() (*UpdatebitbucketRepoIntegrationRequestParameters, bool) { + if o == nil || IsNil(o.Parameters) { + return nil, false + } + return o.Parameters, true +} + +// HasParameters returns a boolean if a field has been set. +func (o *UpdatebitbucketRepoIntegrationRequest) HasParameters() bool { + if o != nil && !IsNil(o.Parameters) { + return true + } + + return false +} + +// SetParameters gets a reference to the given UpdatebitbucketRepoIntegrationRequestParameters and assigns it to the Parameters field. +func (o *UpdatebitbucketRepoIntegrationRequest) SetParameters(v UpdatebitbucketRepoIntegrationRequestParameters) { + o.Parameters = &v +} + +// GetProxyId returns the ProxyId field value if set, zero value otherwise. +func (o *UpdatebitbucketRepoIntegrationRequest) GetProxyId() string { + if o == nil || IsNil(o.ProxyId) { + var ret string + return ret + } + return *o.ProxyId +} + +// GetProxyIdOk returns a tuple with the ProxyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatebitbucketRepoIntegrationRequest) GetProxyIdOk() (*string, bool) { + if o == nil || IsNil(o.ProxyId) { + return nil, false + } + return o.ProxyId, true +} + +// HasProxyId returns a boolean if a field has been set. +func (o *UpdatebitbucketRepoIntegrationRequest) HasProxyId() bool { + if o != nil && !IsNil(o.ProxyId) { + return true + } + + return false +} + +// SetProxyId gets a reference to the given string and assigns it to the ProxyId field. +func (o *UpdatebitbucketRepoIntegrationRequest) SetProxyId(v string) { + o.ProxyId = &v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *UpdatebitbucketRepoIntegrationRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatebitbucketRepoIntegrationRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *UpdatebitbucketRepoIntegrationRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *UpdatebitbucketRepoIntegrationRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o UpdatebitbucketRepoIntegrationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdatebitbucketRepoIntegrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Parameters) { + toSerialize["parameters"] = o.Parameters + } + if !IsNil(o.ProxyId) { + toSerialize["proxyId"] = o.ProxyId + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdatebitbucketRepoIntegrationRequest) UnmarshalJSON(data []byte) (err error) { + varUpdatebitbucketRepoIntegrationRequest := _UpdatebitbucketRepoIntegrationRequest{} + + err = json.Unmarshal(data, &varUpdatebitbucketRepoIntegrationRequest) + + if err != nil { + return err + } + + *o = UpdatebitbucketRepoIntegrationRequest(varUpdatebitbucketRepoIntegrationRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "parameters") + delete(additionalProperties, "proxyId") + delete(additionalProperties, "projectIds") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdatebitbucketRepoIntegrationRequest struct { + value *UpdatebitbucketRepoIntegrationRequest + isSet bool +} + +func (v NullableUpdatebitbucketRepoIntegrationRequest) Get() *UpdatebitbucketRepoIntegrationRequest { + return v.value +} + +func (v *NullableUpdatebitbucketRepoIntegrationRequest) Set(val *UpdatebitbucketRepoIntegrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdatebitbucketRepoIntegrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdatebitbucketRepoIntegrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdatebitbucketRepoIntegrationRequest(val *UpdatebitbucketRepoIntegrationRequest) *NullableUpdatebitbucketRepoIntegrationRequest { + return &NullableUpdatebitbucketRepoIntegrationRequest{value: val, isSet: true} +} + +func (v NullableUpdatebitbucketRepoIntegrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdatebitbucketRepoIntegrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_updatebitbucket_repo_integration_request_parameters.go b/pkg/api/v3/model_updatebitbucket_repo_integration_request_parameters.go new file mode 100644 index 00000000..9838c118 --- /dev/null +++ b/pkg/api/v3/model_updatebitbucket_repo_integration_request_parameters.go @@ -0,0 +1,300 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the UpdatebitbucketRepoIntegrationRequestParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdatebitbucketRepoIntegrationRequestParameters{} + +// UpdatebitbucketRepoIntegrationRequestParameters The new parameters of the integration +type UpdatebitbucketRepoIntegrationRequestParameters struct { + ApiKey string `json:"api_key"` + WorkspaceName string `json:"workspace_name"` + RepositoryName string `json:"repository_name"` + Username *string `json:"username,omitempty"` + InstanceUrl *string `json:"instance_url,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdatebitbucketRepoIntegrationRequestParameters UpdatebitbucketRepoIntegrationRequestParameters + +// NewUpdatebitbucketRepoIntegrationRequestParameters instantiates a new UpdatebitbucketRepoIntegrationRequestParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdatebitbucketRepoIntegrationRequestParameters(apiKey string, workspaceName string, repositoryName string) *UpdatebitbucketRepoIntegrationRequestParameters { + this := UpdatebitbucketRepoIntegrationRequestParameters{} + this.ApiKey = apiKey + this.WorkspaceName = workspaceName + this.RepositoryName = repositoryName + return &this +} + +// NewUpdatebitbucketRepoIntegrationRequestParametersWithDefaults instantiates a new UpdatebitbucketRepoIntegrationRequestParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdatebitbucketRepoIntegrationRequestParametersWithDefaults() *UpdatebitbucketRepoIntegrationRequestParameters { + this := UpdatebitbucketRepoIntegrationRequestParameters{} + return &this +} + +// GetApiKey returns the ApiKey field value +func (o *UpdatebitbucketRepoIntegrationRequestParameters) GetApiKey() string { + if o == nil { + var ret string + return ret + } + + return o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value +// and a boolean to check if the value has been set. +func (o *UpdatebitbucketRepoIntegrationRequestParameters) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiKey, true +} + +// SetApiKey sets field value +func (o *UpdatebitbucketRepoIntegrationRequestParameters) SetApiKey(v string) { + o.ApiKey = v +} + +// GetWorkspaceName returns the WorkspaceName field value +func (o *UpdatebitbucketRepoIntegrationRequestParameters) GetWorkspaceName() string { + if o == nil { + var ret string + return ret + } + + return o.WorkspaceName +} + +// GetWorkspaceNameOk returns a tuple with the WorkspaceName field value +// and a boolean to check if the value has been set. +func (o *UpdatebitbucketRepoIntegrationRequestParameters) GetWorkspaceNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.WorkspaceName, true +} + +// SetWorkspaceName sets field value +func (o *UpdatebitbucketRepoIntegrationRequestParameters) SetWorkspaceName(v string) { + o.WorkspaceName = v +} + +// GetRepositoryName returns the RepositoryName field value +func (o *UpdatebitbucketRepoIntegrationRequestParameters) GetRepositoryName() string { + if o == nil { + var ret string + return ret + } + + return o.RepositoryName +} + +// GetRepositoryNameOk returns a tuple with the RepositoryName field value +// and a boolean to check if the value has been set. +func (o *UpdatebitbucketRepoIntegrationRequestParameters) GetRepositoryNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.RepositoryName, true +} + +// SetRepositoryName sets field value +func (o *UpdatebitbucketRepoIntegrationRequestParameters) SetRepositoryName(v string) { + o.RepositoryName = v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *UpdatebitbucketRepoIntegrationRequestParameters) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatebitbucketRepoIntegrationRequestParameters) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *UpdatebitbucketRepoIntegrationRequestParameters) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *UpdatebitbucketRepoIntegrationRequestParameters) SetUsername(v string) { + o.Username = &v +} + +// GetInstanceUrl returns the InstanceUrl field value if set, zero value otherwise. +func (o *UpdatebitbucketRepoIntegrationRequestParameters) GetInstanceUrl() string { + if o == nil || IsNil(o.InstanceUrl) { + var ret string + return ret + } + return *o.InstanceUrl +} + +// GetInstanceUrlOk returns a tuple with the InstanceUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatebitbucketRepoIntegrationRequestParameters) GetInstanceUrlOk() (*string, bool) { + if o == nil || IsNil(o.InstanceUrl) { + return nil, false + } + return o.InstanceUrl, true +} + +// HasInstanceUrl returns a boolean if a field has been set. +func (o *UpdatebitbucketRepoIntegrationRequestParameters) HasInstanceUrl() bool { + if o != nil && !IsNil(o.InstanceUrl) { + return true + } + + return false +} + +// SetInstanceUrl gets a reference to the given string and assigns it to the InstanceUrl field. +func (o *UpdatebitbucketRepoIntegrationRequestParameters) SetInstanceUrl(v string) { + o.InstanceUrl = &v +} + +func (o UpdatebitbucketRepoIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdatebitbucketRepoIntegrationRequestParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["api_key"] = o.ApiKey + toSerialize["workspace_name"] = o.WorkspaceName + toSerialize["repository_name"] = o.RepositoryName + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + if !IsNil(o.InstanceUrl) { + toSerialize["instance_url"] = o.InstanceUrl + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdatebitbucketRepoIntegrationRequestParameters) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "api_key", + "workspace_name", + "repository_name", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUpdatebitbucketRepoIntegrationRequestParameters := _UpdatebitbucketRepoIntegrationRequestParameters{} + + err = json.Unmarshal(data, &varUpdatebitbucketRepoIntegrationRequestParameters) + + if err != nil { + return err + } + + *o = UpdatebitbucketRepoIntegrationRequestParameters(varUpdatebitbucketRepoIntegrationRequestParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "api_key") + delete(additionalProperties, "workspace_name") + delete(additionalProperties, "repository_name") + delete(additionalProperties, "username") + delete(additionalProperties, "instance_url") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdatebitbucketRepoIntegrationRequestParameters struct { + value *UpdatebitbucketRepoIntegrationRequestParameters + isSet bool +} + +func (v NullableUpdatebitbucketRepoIntegrationRequestParameters) Get() *UpdatebitbucketRepoIntegrationRequestParameters { + return v.value +} + +func (v *NullableUpdatebitbucketRepoIntegrationRequestParameters) Set(val *UpdatebitbucketRepoIntegrationRequestParameters) { + v.value = val + v.isSet = true +} + +func (v NullableUpdatebitbucketRepoIntegrationRequestParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdatebitbucketRepoIntegrationRequestParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdatebitbucketRepoIntegrationRequestParameters(val *UpdatebitbucketRepoIntegrationRequestParameters) *NullableUpdatebitbucketRepoIntegrationRequestParameters { + return &NullableUpdatebitbucketRepoIntegrationRequestParameters{value: val, isSet: true} +} + +func (v NullableUpdatebitbucketRepoIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdatebitbucketRepoIntegrationRequestParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_updatecloudflare_integration_request.go b/pkg/api/v3/model_updatecloudflare_integration_request.go new file mode 100644 index 00000000..fd79a1e8 --- /dev/null +++ b/pkg/api/v3/model_updatecloudflare_integration_request.go @@ -0,0 +1,269 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" +) + +// checks if the UpdatecloudflareIntegrationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdatecloudflareIntegrationRequest{} + +// UpdatecloudflareIntegrationRequest struct for UpdatecloudflareIntegrationRequest +type UpdatecloudflareIntegrationRequest struct { + // The new name of the integration + Name *string `json:"name,omitempty"` + Parameters *UpdatecloudflareIntegrationRequestParameters `json:"parameters,omitempty"` + // Optional proxy ID to attach to the integration + ProxyId *string `json:"proxyId,omitempty"` + // Optional list of project IDs to attach to the integration + ProjectIds []string `json:"projectIds,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdatecloudflareIntegrationRequest UpdatecloudflareIntegrationRequest + +// NewUpdatecloudflareIntegrationRequest instantiates a new UpdatecloudflareIntegrationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdatecloudflareIntegrationRequest() *UpdatecloudflareIntegrationRequest { + this := UpdatecloudflareIntegrationRequest{} + return &this +} + +// NewUpdatecloudflareIntegrationRequestWithDefaults instantiates a new UpdatecloudflareIntegrationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdatecloudflareIntegrationRequestWithDefaults() *UpdatecloudflareIntegrationRequest { + this := UpdatecloudflareIntegrationRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdatecloudflareIntegrationRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatecloudflareIntegrationRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdatecloudflareIntegrationRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdatecloudflareIntegrationRequest) SetName(v string) { + o.Name = &v +} + +// GetParameters returns the Parameters field value if set, zero value otherwise. +func (o *UpdatecloudflareIntegrationRequest) GetParameters() UpdatecloudflareIntegrationRequestParameters { + if o == nil || IsNil(o.Parameters) { + var ret UpdatecloudflareIntegrationRequestParameters + return ret + } + return *o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatecloudflareIntegrationRequest) GetParametersOk() (*UpdatecloudflareIntegrationRequestParameters, bool) { + if o == nil || IsNil(o.Parameters) { + return nil, false + } + return o.Parameters, true +} + +// HasParameters returns a boolean if a field has been set. +func (o *UpdatecloudflareIntegrationRequest) HasParameters() bool { + if o != nil && !IsNil(o.Parameters) { + return true + } + + return false +} + +// SetParameters gets a reference to the given UpdatecloudflareIntegrationRequestParameters and assigns it to the Parameters field. +func (o *UpdatecloudflareIntegrationRequest) SetParameters(v UpdatecloudflareIntegrationRequestParameters) { + o.Parameters = &v +} + +// GetProxyId returns the ProxyId field value if set, zero value otherwise. +func (o *UpdatecloudflareIntegrationRequest) GetProxyId() string { + if o == nil || IsNil(o.ProxyId) { + var ret string + return ret + } + return *o.ProxyId +} + +// GetProxyIdOk returns a tuple with the ProxyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatecloudflareIntegrationRequest) GetProxyIdOk() (*string, bool) { + if o == nil || IsNil(o.ProxyId) { + return nil, false + } + return o.ProxyId, true +} + +// HasProxyId returns a boolean if a field has been set. +func (o *UpdatecloudflareIntegrationRequest) HasProxyId() bool { + if o != nil && !IsNil(o.ProxyId) { + return true + } + + return false +} + +// SetProxyId gets a reference to the given string and assigns it to the ProxyId field. +func (o *UpdatecloudflareIntegrationRequest) SetProxyId(v string) { + o.ProxyId = &v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *UpdatecloudflareIntegrationRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatecloudflareIntegrationRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *UpdatecloudflareIntegrationRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *UpdatecloudflareIntegrationRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o UpdatecloudflareIntegrationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdatecloudflareIntegrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Parameters) { + toSerialize["parameters"] = o.Parameters + } + if !IsNil(o.ProxyId) { + toSerialize["proxyId"] = o.ProxyId + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdatecloudflareIntegrationRequest) UnmarshalJSON(data []byte) (err error) { + varUpdatecloudflareIntegrationRequest := _UpdatecloudflareIntegrationRequest{} + + err = json.Unmarshal(data, &varUpdatecloudflareIntegrationRequest) + + if err != nil { + return err + } + + *o = UpdatecloudflareIntegrationRequest(varUpdatecloudflareIntegrationRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "parameters") + delete(additionalProperties, "proxyId") + delete(additionalProperties, "projectIds") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdatecloudflareIntegrationRequest struct { + value *UpdatecloudflareIntegrationRequest + isSet bool +} + +func (v NullableUpdatecloudflareIntegrationRequest) Get() *UpdatecloudflareIntegrationRequest { + return v.value +} + +func (v *NullableUpdatecloudflareIntegrationRequest) Set(val *UpdatecloudflareIntegrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdatecloudflareIntegrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdatecloudflareIntegrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdatecloudflareIntegrationRequest(val *UpdatecloudflareIntegrationRequest) *NullableUpdatecloudflareIntegrationRequest { + return &NullableUpdatecloudflareIntegrationRequest{value: val, isSet: true} +} + +func (v NullableUpdatecloudflareIntegrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdatecloudflareIntegrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_updatecloudflare_integration_request_parameters.go b/pkg/api/v3/model_updatecloudflare_integration_request_parameters.go new file mode 100644 index 00000000..4892a01b --- /dev/null +++ b/pkg/api/v3/model_updatecloudflare_integration_request_parameters.go @@ -0,0 +1,168 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the UpdatecloudflareIntegrationRequestParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdatecloudflareIntegrationRequestParameters{} + +// UpdatecloudflareIntegrationRequestParameters The new parameters of the integration +type UpdatecloudflareIntegrationRequestParameters struct { + ApiKey string `json:"api_key"` + AdditionalProperties map[string]interface{} +} + +type _UpdatecloudflareIntegrationRequestParameters UpdatecloudflareIntegrationRequestParameters + +// NewUpdatecloudflareIntegrationRequestParameters instantiates a new UpdatecloudflareIntegrationRequestParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdatecloudflareIntegrationRequestParameters(apiKey string) *UpdatecloudflareIntegrationRequestParameters { + this := UpdatecloudflareIntegrationRequestParameters{} + this.ApiKey = apiKey + return &this +} + +// NewUpdatecloudflareIntegrationRequestParametersWithDefaults instantiates a new UpdatecloudflareIntegrationRequestParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdatecloudflareIntegrationRequestParametersWithDefaults() *UpdatecloudflareIntegrationRequestParameters { + this := UpdatecloudflareIntegrationRequestParameters{} + return &this +} + +// GetApiKey returns the ApiKey field value +func (o *UpdatecloudflareIntegrationRequestParameters) GetApiKey() string { + if o == nil { + var ret string + return ret + } + + return o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value +// and a boolean to check if the value has been set. +func (o *UpdatecloudflareIntegrationRequestParameters) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiKey, true +} + +// SetApiKey sets field value +func (o *UpdatecloudflareIntegrationRequestParameters) SetApiKey(v string) { + o.ApiKey = v +} + +func (o UpdatecloudflareIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdatecloudflareIntegrationRequestParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["api_key"] = o.ApiKey + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdatecloudflareIntegrationRequestParameters) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "api_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUpdatecloudflareIntegrationRequestParameters := _UpdatecloudflareIntegrationRequestParameters{} + + err = json.Unmarshal(data, &varUpdatecloudflareIntegrationRequestParameters) + + if err != nil { + return err + } + + *o = UpdatecloudflareIntegrationRequestParameters(varUpdatecloudflareIntegrationRequestParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "api_key") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdatecloudflareIntegrationRequestParameters struct { + value *UpdatecloudflareIntegrationRequestParameters + isSet bool +} + +func (v NullableUpdatecloudflareIntegrationRequestParameters) Get() *UpdatecloudflareIntegrationRequestParameters { + return v.value +} + +func (v *NullableUpdatecloudflareIntegrationRequestParameters) Set(val *UpdatecloudflareIntegrationRequestParameters) { + v.value = val + v.isSet = true +} + +func (v NullableUpdatecloudflareIntegrationRequestParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdatecloudflareIntegrationRequestParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdatecloudflareIntegrationRequestParameters(val *UpdatecloudflareIntegrationRequestParameters) *NullableUpdatecloudflareIntegrationRequestParameters { + return &NullableUpdatecloudflareIntegrationRequestParameters{value: val, isSet: true} +} + +func (v NullableUpdatecloudflareIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdatecloudflareIntegrationRequestParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_updategitlab_integration_request.go b/pkg/api/v3/model_updategitlab_integration_request.go new file mode 100644 index 00000000..4a25695a --- /dev/null +++ b/pkg/api/v3/model_updategitlab_integration_request.go @@ -0,0 +1,269 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" +) + +// checks if the UpdategitlabIntegrationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdategitlabIntegrationRequest{} + +// UpdategitlabIntegrationRequest struct for UpdategitlabIntegrationRequest +type UpdategitlabIntegrationRequest struct { + // The new name of the integration + Name *string `json:"name,omitempty"` + Parameters *UpdategitlabIntegrationRequestParameters `json:"parameters,omitempty"` + // Optional proxy ID to attach to the integration + ProxyId *string `json:"proxyId,omitempty"` + // Optional list of project IDs to attach to the integration + ProjectIds []string `json:"projectIds,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdategitlabIntegrationRequest UpdategitlabIntegrationRequest + +// NewUpdategitlabIntegrationRequest instantiates a new UpdategitlabIntegrationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdategitlabIntegrationRequest() *UpdategitlabIntegrationRequest { + this := UpdategitlabIntegrationRequest{} + return &this +} + +// NewUpdategitlabIntegrationRequestWithDefaults instantiates a new UpdategitlabIntegrationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdategitlabIntegrationRequestWithDefaults() *UpdategitlabIntegrationRequest { + this := UpdategitlabIntegrationRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdategitlabIntegrationRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdategitlabIntegrationRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdategitlabIntegrationRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdategitlabIntegrationRequest) SetName(v string) { + o.Name = &v +} + +// GetParameters returns the Parameters field value if set, zero value otherwise. +func (o *UpdategitlabIntegrationRequest) GetParameters() UpdategitlabIntegrationRequestParameters { + if o == nil || IsNil(o.Parameters) { + var ret UpdategitlabIntegrationRequestParameters + return ret + } + return *o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdategitlabIntegrationRequest) GetParametersOk() (*UpdategitlabIntegrationRequestParameters, bool) { + if o == nil || IsNil(o.Parameters) { + return nil, false + } + return o.Parameters, true +} + +// HasParameters returns a boolean if a field has been set. +func (o *UpdategitlabIntegrationRequest) HasParameters() bool { + if o != nil && !IsNil(o.Parameters) { + return true + } + + return false +} + +// SetParameters gets a reference to the given UpdategitlabIntegrationRequestParameters and assigns it to the Parameters field. +func (o *UpdategitlabIntegrationRequest) SetParameters(v UpdategitlabIntegrationRequestParameters) { + o.Parameters = &v +} + +// GetProxyId returns the ProxyId field value if set, zero value otherwise. +func (o *UpdategitlabIntegrationRequest) GetProxyId() string { + if o == nil || IsNil(o.ProxyId) { + var ret string + return ret + } + return *o.ProxyId +} + +// GetProxyIdOk returns a tuple with the ProxyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdategitlabIntegrationRequest) GetProxyIdOk() (*string, bool) { + if o == nil || IsNil(o.ProxyId) { + return nil, false + } + return o.ProxyId, true +} + +// HasProxyId returns a boolean if a field has been set. +func (o *UpdategitlabIntegrationRequest) HasProxyId() bool { + if o != nil && !IsNil(o.ProxyId) { + return true + } + + return false +} + +// SetProxyId gets a reference to the given string and assigns it to the ProxyId field. +func (o *UpdategitlabIntegrationRequest) SetProxyId(v string) { + o.ProxyId = &v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *UpdategitlabIntegrationRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdategitlabIntegrationRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *UpdategitlabIntegrationRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *UpdategitlabIntegrationRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o UpdategitlabIntegrationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdategitlabIntegrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Parameters) { + toSerialize["parameters"] = o.Parameters + } + if !IsNil(o.ProxyId) { + toSerialize["proxyId"] = o.ProxyId + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdategitlabIntegrationRequest) UnmarshalJSON(data []byte) (err error) { + varUpdategitlabIntegrationRequest := _UpdategitlabIntegrationRequest{} + + err = json.Unmarshal(data, &varUpdategitlabIntegrationRequest) + + if err != nil { + return err + } + + *o = UpdategitlabIntegrationRequest(varUpdategitlabIntegrationRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "parameters") + delete(additionalProperties, "proxyId") + delete(additionalProperties, "projectIds") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdategitlabIntegrationRequest struct { + value *UpdategitlabIntegrationRequest + isSet bool +} + +func (v NullableUpdategitlabIntegrationRequest) Get() *UpdategitlabIntegrationRequest { + return v.value +} + +func (v *NullableUpdategitlabIntegrationRequest) Set(val *UpdategitlabIntegrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdategitlabIntegrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdategitlabIntegrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdategitlabIntegrationRequest(val *UpdategitlabIntegrationRequest) *NullableUpdategitlabIntegrationRequest { + return &NullableUpdategitlabIntegrationRequest{value: val, isSet: true} +} + +func (v NullableUpdategitlabIntegrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdategitlabIntegrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_updategitlab_integration_request_parameters.go b/pkg/api/v3/model_updategitlab_integration_request_parameters.go new file mode 100644 index 00000000..27428c6c --- /dev/null +++ b/pkg/api/v3/model_updategitlab_integration_request_parameters.go @@ -0,0 +1,205 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the UpdategitlabIntegrationRequestParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdategitlabIntegrationRequestParameters{} + +// UpdategitlabIntegrationRequestParameters The new parameters of the integration +type UpdategitlabIntegrationRequestParameters struct { + ApiKey string `json:"api_key"` + InstanceUrl *string `json:"instance_url,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdategitlabIntegrationRequestParameters UpdategitlabIntegrationRequestParameters + +// NewUpdategitlabIntegrationRequestParameters instantiates a new UpdategitlabIntegrationRequestParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdategitlabIntegrationRequestParameters(apiKey string) *UpdategitlabIntegrationRequestParameters { + this := UpdategitlabIntegrationRequestParameters{} + this.ApiKey = apiKey + return &this +} + +// NewUpdategitlabIntegrationRequestParametersWithDefaults instantiates a new UpdategitlabIntegrationRequestParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdategitlabIntegrationRequestParametersWithDefaults() *UpdategitlabIntegrationRequestParameters { + this := UpdategitlabIntegrationRequestParameters{} + return &this +} + +// GetApiKey returns the ApiKey field value +func (o *UpdategitlabIntegrationRequestParameters) GetApiKey() string { + if o == nil { + var ret string + return ret + } + + return o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value +// and a boolean to check if the value has been set. +func (o *UpdategitlabIntegrationRequestParameters) GetApiKeyOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiKey, true +} + +// SetApiKey sets field value +func (o *UpdategitlabIntegrationRequestParameters) SetApiKey(v string) { + o.ApiKey = v +} + +// GetInstanceUrl returns the InstanceUrl field value if set, zero value otherwise. +func (o *UpdategitlabIntegrationRequestParameters) GetInstanceUrl() string { + if o == nil || IsNil(o.InstanceUrl) { + var ret string + return ret + } + return *o.InstanceUrl +} + +// GetInstanceUrlOk returns a tuple with the InstanceUrl field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdategitlabIntegrationRequestParameters) GetInstanceUrlOk() (*string, bool) { + if o == nil || IsNil(o.InstanceUrl) { + return nil, false + } + return o.InstanceUrl, true +} + +// HasInstanceUrl returns a boolean if a field has been set. +func (o *UpdategitlabIntegrationRequestParameters) HasInstanceUrl() bool { + if o != nil && !IsNil(o.InstanceUrl) { + return true + } + + return false +} + +// SetInstanceUrl gets a reference to the given string and assigns it to the InstanceUrl field. +func (o *UpdategitlabIntegrationRequestParameters) SetInstanceUrl(v string) { + o.InstanceUrl = &v +} + +func (o UpdategitlabIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdategitlabIntegrationRequestParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["api_key"] = o.ApiKey + if !IsNil(o.InstanceUrl) { + toSerialize["instance_url"] = o.InstanceUrl + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdategitlabIntegrationRequestParameters) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "api_key", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUpdategitlabIntegrationRequestParameters := _UpdategitlabIntegrationRequestParameters{} + + err = json.Unmarshal(data, &varUpdategitlabIntegrationRequestParameters) + + if err != nil { + return err + } + + *o = UpdategitlabIntegrationRequestParameters(varUpdategitlabIntegrationRequestParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "api_key") + delete(additionalProperties, "instance_url") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdategitlabIntegrationRequestParameters struct { + value *UpdategitlabIntegrationRequestParameters + isSet bool +} + +func (v NullableUpdategitlabIntegrationRequestParameters) Get() *UpdategitlabIntegrationRequestParameters { + return v.value +} + +func (v *NullableUpdategitlabIntegrationRequestParameters) Set(val *UpdategitlabIntegrationRequestParameters) { + v.value = val + v.isSet = true +} + +func (v NullableUpdategitlabIntegrationRequestParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdategitlabIntegrationRequestParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdategitlabIntegrationRequestParameters(val *UpdategitlabIntegrationRequestParameters) *NullableUpdategitlabIntegrationRequestParameters { + return &NullableUpdategitlabIntegrationRequestParameters{value: val, isSet: true} +} + +func (v NullableUpdategitlabIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdategitlabIntegrationRequestParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_updatejira_integration_request.go b/pkg/api/v3/model_updatejira_integration_request.go new file mode 100644 index 00000000..3fabf6bd --- /dev/null +++ b/pkg/api/v3/model_updatejira_integration_request.go @@ -0,0 +1,269 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" +) + +// checks if the UpdatejiraIntegrationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdatejiraIntegrationRequest{} + +// UpdatejiraIntegrationRequest struct for UpdatejiraIntegrationRequest +type UpdatejiraIntegrationRequest struct { + // The new name of the integration + Name *string `json:"name,omitempty"` + Parameters *UpdatejiraIntegrationRequestParameters `json:"parameters,omitempty"` + // Optional proxy ID to attach to the integration + ProxyId *string `json:"proxyId,omitempty"` + // Optional list of project IDs to attach to the integration + ProjectIds []string `json:"projectIds,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdatejiraIntegrationRequest UpdatejiraIntegrationRequest + +// NewUpdatejiraIntegrationRequest instantiates a new UpdatejiraIntegrationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdatejiraIntegrationRequest() *UpdatejiraIntegrationRequest { + this := UpdatejiraIntegrationRequest{} + return &this +} + +// NewUpdatejiraIntegrationRequestWithDefaults instantiates a new UpdatejiraIntegrationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdatejiraIntegrationRequestWithDefaults() *UpdatejiraIntegrationRequest { + this := UpdatejiraIntegrationRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdatejiraIntegrationRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatejiraIntegrationRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdatejiraIntegrationRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdatejiraIntegrationRequest) SetName(v string) { + o.Name = &v +} + +// GetParameters returns the Parameters field value if set, zero value otherwise. +func (o *UpdatejiraIntegrationRequest) GetParameters() UpdatejiraIntegrationRequestParameters { + if o == nil || IsNil(o.Parameters) { + var ret UpdatejiraIntegrationRequestParameters + return ret + } + return *o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatejiraIntegrationRequest) GetParametersOk() (*UpdatejiraIntegrationRequestParameters, bool) { + if o == nil || IsNil(o.Parameters) { + return nil, false + } + return o.Parameters, true +} + +// HasParameters returns a boolean if a field has been set. +func (o *UpdatejiraIntegrationRequest) HasParameters() bool { + if o != nil && !IsNil(o.Parameters) { + return true + } + + return false +} + +// SetParameters gets a reference to the given UpdatejiraIntegrationRequestParameters and assigns it to the Parameters field. +func (o *UpdatejiraIntegrationRequest) SetParameters(v UpdatejiraIntegrationRequestParameters) { + o.Parameters = &v +} + +// GetProxyId returns the ProxyId field value if set, zero value otherwise. +func (o *UpdatejiraIntegrationRequest) GetProxyId() string { + if o == nil || IsNil(o.ProxyId) { + var ret string + return ret + } + return *o.ProxyId +} + +// GetProxyIdOk returns a tuple with the ProxyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatejiraIntegrationRequest) GetProxyIdOk() (*string, bool) { + if o == nil || IsNil(o.ProxyId) { + return nil, false + } + return o.ProxyId, true +} + +// HasProxyId returns a boolean if a field has been set. +func (o *UpdatejiraIntegrationRequest) HasProxyId() bool { + if o != nil && !IsNil(o.ProxyId) { + return true + } + + return false +} + +// SetProxyId gets a reference to the given string and assigns it to the ProxyId field. +func (o *UpdatejiraIntegrationRequest) SetProxyId(v string) { + o.ProxyId = &v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *UpdatejiraIntegrationRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatejiraIntegrationRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *UpdatejiraIntegrationRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *UpdatejiraIntegrationRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o UpdatejiraIntegrationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdatejiraIntegrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Parameters) { + toSerialize["parameters"] = o.Parameters + } + if !IsNil(o.ProxyId) { + toSerialize["proxyId"] = o.ProxyId + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdatejiraIntegrationRequest) UnmarshalJSON(data []byte) (err error) { + varUpdatejiraIntegrationRequest := _UpdatejiraIntegrationRequest{} + + err = json.Unmarshal(data, &varUpdatejiraIntegrationRequest) + + if err != nil { + return err + } + + *o = UpdatejiraIntegrationRequest(varUpdatejiraIntegrationRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "parameters") + delete(additionalProperties, "proxyId") + delete(additionalProperties, "projectIds") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdatejiraIntegrationRequest struct { + value *UpdatejiraIntegrationRequest + isSet bool +} + +func (v NullableUpdatejiraIntegrationRequest) Get() *UpdatejiraIntegrationRequest { + return v.value +} + +func (v *NullableUpdatejiraIntegrationRequest) Set(val *UpdatejiraIntegrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdatejiraIntegrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdatejiraIntegrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdatejiraIntegrationRequest(val *UpdatejiraIntegrationRequest) *NullableUpdatejiraIntegrationRequest { + return &NullableUpdatejiraIntegrationRequest{value: val, isSet: true} +} + +func (v NullableUpdatejiraIntegrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdatejiraIntegrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_updatejira_integration_request_parameters.go b/pkg/api/v3/model_updatejira_integration_request_parameters.go new file mode 100644 index 00000000..066f086a --- /dev/null +++ b/pkg/api/v3/model_updatejira_integration_request_parameters.go @@ -0,0 +1,477 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the UpdatejiraIntegrationRequestParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdatejiraIntegrationRequestParameters{} + +// UpdatejiraIntegrationRequestParameters The new parameters of the integration +type UpdatejiraIntegrationRequestParameters struct { + Name string `json:"name"` + AccountId string `json:"account_id"` + InstanceUrl string `json:"instance_url"` + AuthMethod ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD `json:"auth_method"` + Email *string `json:"email,omitempty"` + ApiKey *string `json:"api_key,omitempty"` + Username *string `json:"username,omitempty"` + Password *string `json:"password,omitempty"` + ProxyId *string `json:"proxy_id,omitempty"` + Templates []CreatejiraIntegrationRequestParametersTemplatesInner `json:"templates,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdatejiraIntegrationRequestParameters UpdatejiraIntegrationRequestParameters + +// NewUpdatejiraIntegrationRequestParameters instantiates a new UpdatejiraIntegrationRequestParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdatejiraIntegrationRequestParameters(name string, accountId string, instanceUrl string, authMethod ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD) *UpdatejiraIntegrationRequestParameters { + this := UpdatejiraIntegrationRequestParameters{} + this.Name = name + this.AccountId = accountId + this.InstanceUrl = instanceUrl + this.AuthMethod = authMethod + return &this +} + +// NewUpdatejiraIntegrationRequestParametersWithDefaults instantiates a new UpdatejiraIntegrationRequestParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdatejiraIntegrationRequestParametersWithDefaults() *UpdatejiraIntegrationRequestParameters { + this := UpdatejiraIntegrationRequestParameters{} + return &this +} + +// GetName returns the Name field value +func (o *UpdatejiraIntegrationRequestParameters) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *UpdatejiraIntegrationRequestParameters) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *UpdatejiraIntegrationRequestParameters) SetName(v string) { + o.Name = v +} + +// GetAccountId returns the AccountId field value +func (o *UpdatejiraIntegrationRequestParameters) GetAccountId() string { + if o == nil { + var ret string + return ret + } + + return o.AccountId +} + +// GetAccountIdOk returns a tuple with the AccountId field value +// and a boolean to check if the value has been set. +func (o *UpdatejiraIntegrationRequestParameters) GetAccountIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.AccountId, true +} + +// SetAccountId sets field value +func (o *UpdatejiraIntegrationRequestParameters) SetAccountId(v string) { + o.AccountId = v +} + +// GetInstanceUrl returns the InstanceUrl field value +func (o *UpdatejiraIntegrationRequestParameters) GetInstanceUrl() string { + if o == nil { + var ret string + return ret + } + + return o.InstanceUrl +} + +// GetInstanceUrlOk returns a tuple with the InstanceUrl field value +// and a boolean to check if the value has been set. +func (o *UpdatejiraIntegrationRequestParameters) GetInstanceUrlOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.InstanceUrl, true +} + +// SetInstanceUrl sets field value +func (o *UpdatejiraIntegrationRequestParameters) SetInstanceUrl(v string) { + o.InstanceUrl = v +} + +// GetAuthMethod returns the AuthMethod field value +func (o *UpdatejiraIntegrationRequestParameters) GetAuthMethod() ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD { + if o == nil { + var ret ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD + return ret + } + + return o.AuthMethod +} + +// GetAuthMethodOk returns a tuple with the AuthMethod field value +// and a boolean to check if the value has been set. +func (o *UpdatejiraIntegrationRequestParameters) GetAuthMethodOk() (*ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD, bool) { + if o == nil { + return nil, false + } + return &o.AuthMethod, true +} + +// SetAuthMethod sets field value +func (o *UpdatejiraIntegrationRequestParameters) SetAuthMethod(v ENUMPROPERTIESPARAMETERSPROPERTIESAUTHMETHOD) { + o.AuthMethod = v +} + +// GetEmail returns the Email field value if set, zero value otherwise. +func (o *UpdatejiraIntegrationRequestParameters) GetEmail() string { + if o == nil || IsNil(o.Email) { + var ret string + return ret + } + return *o.Email +} + +// GetEmailOk returns a tuple with the Email field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatejiraIntegrationRequestParameters) GetEmailOk() (*string, bool) { + if o == nil || IsNil(o.Email) { + return nil, false + } + return o.Email, true +} + +// HasEmail returns a boolean if a field has been set. +func (o *UpdatejiraIntegrationRequestParameters) HasEmail() bool { + if o != nil && !IsNil(o.Email) { + return true + } + + return false +} + +// SetEmail gets a reference to the given string and assigns it to the Email field. +func (o *UpdatejiraIntegrationRequestParameters) SetEmail(v string) { + o.Email = &v +} + +// GetApiKey returns the ApiKey field value if set, zero value otherwise. +func (o *UpdatejiraIntegrationRequestParameters) GetApiKey() string { + if o == nil || IsNil(o.ApiKey) { + var ret string + return ret + } + return *o.ApiKey +} + +// GetApiKeyOk returns a tuple with the ApiKey field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatejiraIntegrationRequestParameters) GetApiKeyOk() (*string, bool) { + if o == nil || IsNil(o.ApiKey) { + return nil, false + } + return o.ApiKey, true +} + +// HasApiKey returns a boolean if a field has been set. +func (o *UpdatejiraIntegrationRequestParameters) HasApiKey() bool { + if o != nil && !IsNil(o.ApiKey) { + return true + } + + return false +} + +// SetApiKey gets a reference to the given string and assigns it to the ApiKey field. +func (o *UpdatejiraIntegrationRequestParameters) SetApiKey(v string) { + o.ApiKey = &v +} + +// GetUsername returns the Username field value if set, zero value otherwise. +func (o *UpdatejiraIntegrationRequestParameters) GetUsername() string { + if o == nil || IsNil(o.Username) { + var ret string + return ret + } + return *o.Username +} + +// GetUsernameOk returns a tuple with the Username field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatejiraIntegrationRequestParameters) GetUsernameOk() (*string, bool) { + if o == nil || IsNil(o.Username) { + return nil, false + } + return o.Username, true +} + +// HasUsername returns a boolean if a field has been set. +func (o *UpdatejiraIntegrationRequestParameters) HasUsername() bool { + if o != nil && !IsNil(o.Username) { + return true + } + + return false +} + +// SetUsername gets a reference to the given string and assigns it to the Username field. +func (o *UpdatejiraIntegrationRequestParameters) SetUsername(v string) { + o.Username = &v +} + +// GetPassword returns the Password field value if set, zero value otherwise. +func (o *UpdatejiraIntegrationRequestParameters) GetPassword() string { + if o == nil || IsNil(o.Password) { + var ret string + return ret + } + return *o.Password +} + +// GetPasswordOk returns a tuple with the Password field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatejiraIntegrationRequestParameters) GetPasswordOk() (*string, bool) { + if o == nil || IsNil(o.Password) { + return nil, false + } + return o.Password, true +} + +// HasPassword returns a boolean if a field has been set. +func (o *UpdatejiraIntegrationRequestParameters) HasPassword() bool { + if o != nil && !IsNil(o.Password) { + return true + } + + return false +} + +// SetPassword gets a reference to the given string and assigns it to the Password field. +func (o *UpdatejiraIntegrationRequestParameters) SetPassword(v string) { + o.Password = &v +} + +// GetProxyId returns the ProxyId field value if set, zero value otherwise. +func (o *UpdatejiraIntegrationRequestParameters) GetProxyId() string { + if o == nil || IsNil(o.ProxyId) { + var ret string + return ret + } + return *o.ProxyId +} + +// GetProxyIdOk returns a tuple with the ProxyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatejiraIntegrationRequestParameters) GetProxyIdOk() (*string, bool) { + if o == nil || IsNil(o.ProxyId) { + return nil, false + } + return o.ProxyId, true +} + +// HasProxyId returns a boolean if a field has been set. +func (o *UpdatejiraIntegrationRequestParameters) HasProxyId() bool { + if o != nil && !IsNil(o.ProxyId) { + return true + } + + return false +} + +// SetProxyId gets a reference to the given string and assigns it to the ProxyId field. +func (o *UpdatejiraIntegrationRequestParameters) SetProxyId(v string) { + o.ProxyId = &v +} + +// GetTemplates returns the Templates field value if set, zero value otherwise. +func (o *UpdatejiraIntegrationRequestParameters) GetTemplates() []CreatejiraIntegrationRequestParametersTemplatesInner { + if o == nil || IsNil(o.Templates) { + var ret []CreatejiraIntegrationRequestParametersTemplatesInner + return ret + } + return o.Templates +} + +// GetTemplatesOk returns a tuple with the Templates field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatejiraIntegrationRequestParameters) GetTemplatesOk() ([]CreatejiraIntegrationRequestParametersTemplatesInner, bool) { + if o == nil || IsNil(o.Templates) { + return nil, false + } + return o.Templates, true +} + +// HasTemplates returns a boolean if a field has been set. +func (o *UpdatejiraIntegrationRequestParameters) HasTemplates() bool { + if o != nil && !IsNil(o.Templates) { + return true + } + + return false +} + +// SetTemplates gets a reference to the given []CreatejiraIntegrationRequestParametersTemplatesInner and assigns it to the Templates field. +func (o *UpdatejiraIntegrationRequestParameters) SetTemplates(v []CreatejiraIntegrationRequestParametersTemplatesInner) { + o.Templates = v +} + +func (o UpdatejiraIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdatejiraIntegrationRequestParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["name"] = o.Name + toSerialize["account_id"] = o.AccountId + toSerialize["instance_url"] = o.InstanceUrl + toSerialize["auth_method"] = o.AuthMethod + if !IsNil(o.Email) { + toSerialize["email"] = o.Email + } + if !IsNil(o.ApiKey) { + toSerialize["api_key"] = o.ApiKey + } + if !IsNil(o.Username) { + toSerialize["username"] = o.Username + } + if !IsNil(o.Password) { + toSerialize["password"] = o.Password + } + if !IsNil(o.ProxyId) { + toSerialize["proxy_id"] = o.ProxyId + } + if !IsNil(o.Templates) { + toSerialize["templates"] = o.Templates + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdatejiraIntegrationRequestParameters) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "name", + "account_id", + "instance_url", + "auth_method", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUpdatejiraIntegrationRequestParameters := _UpdatejiraIntegrationRequestParameters{} + + err = json.Unmarshal(data, &varUpdatejiraIntegrationRequestParameters) + + if err != nil { + return err + } + + *o = UpdatejiraIntegrationRequestParameters(varUpdatejiraIntegrationRequestParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "account_id") + delete(additionalProperties, "instance_url") + delete(additionalProperties, "auth_method") + delete(additionalProperties, "email") + delete(additionalProperties, "api_key") + delete(additionalProperties, "username") + delete(additionalProperties, "password") + delete(additionalProperties, "proxy_id") + delete(additionalProperties, "templates") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdatejiraIntegrationRequestParameters struct { + value *UpdatejiraIntegrationRequestParameters + isSet bool +} + +func (v NullableUpdatejiraIntegrationRequestParameters) Get() *UpdatejiraIntegrationRequestParameters { + return v.value +} + +func (v *NullableUpdatejiraIntegrationRequestParameters) Set(val *UpdatejiraIntegrationRequestParameters) { + v.value = val + v.isSet = true +} + +func (v NullableUpdatejiraIntegrationRequestParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdatejiraIntegrationRequestParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdatejiraIntegrationRequestParameters(val *UpdatejiraIntegrationRequestParameters) *NullableUpdatejiraIntegrationRequestParameters { + return &NullableUpdatejiraIntegrationRequestParameters{value: val, isSet: true} +} + +func (v NullableUpdatejiraIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdatejiraIntegrationRequestParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_updatekubernetes_integration_request.go b/pkg/api/v3/model_updatekubernetes_integration_request.go new file mode 100644 index 00000000..e79a6057 --- /dev/null +++ b/pkg/api/v3/model_updatekubernetes_integration_request.go @@ -0,0 +1,269 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" +) + +// checks if the UpdatekubernetesIntegrationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdatekubernetesIntegrationRequest{} + +// UpdatekubernetesIntegrationRequest struct for UpdatekubernetesIntegrationRequest +type UpdatekubernetesIntegrationRequest struct { + // The new name of the integration + Name *string `json:"name,omitempty"` + Parameters *UpdatekubernetesIntegrationRequestParameters `json:"parameters,omitempty"` + // Optional proxy ID to attach to the integration + ProxyId *string `json:"proxyId,omitempty"` + // Optional list of project IDs to attach to the integration + ProjectIds []string `json:"projectIds,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdatekubernetesIntegrationRequest UpdatekubernetesIntegrationRequest + +// NewUpdatekubernetesIntegrationRequest instantiates a new UpdatekubernetesIntegrationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdatekubernetesIntegrationRequest() *UpdatekubernetesIntegrationRequest { + this := UpdatekubernetesIntegrationRequest{} + return &this +} + +// NewUpdatekubernetesIntegrationRequestWithDefaults instantiates a new UpdatekubernetesIntegrationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdatekubernetesIntegrationRequestWithDefaults() *UpdatekubernetesIntegrationRequest { + this := UpdatekubernetesIntegrationRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdatekubernetesIntegrationRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatekubernetesIntegrationRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdatekubernetesIntegrationRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdatekubernetesIntegrationRequest) SetName(v string) { + o.Name = &v +} + +// GetParameters returns the Parameters field value if set, zero value otherwise. +func (o *UpdatekubernetesIntegrationRequest) GetParameters() UpdatekubernetesIntegrationRequestParameters { + if o == nil || IsNil(o.Parameters) { + var ret UpdatekubernetesIntegrationRequestParameters + return ret + } + return *o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatekubernetesIntegrationRequest) GetParametersOk() (*UpdatekubernetesIntegrationRequestParameters, bool) { + if o == nil || IsNil(o.Parameters) { + return nil, false + } + return o.Parameters, true +} + +// HasParameters returns a boolean if a field has been set. +func (o *UpdatekubernetesIntegrationRequest) HasParameters() bool { + if o != nil && !IsNil(o.Parameters) { + return true + } + + return false +} + +// SetParameters gets a reference to the given UpdatekubernetesIntegrationRequestParameters and assigns it to the Parameters field. +func (o *UpdatekubernetesIntegrationRequest) SetParameters(v UpdatekubernetesIntegrationRequestParameters) { + o.Parameters = &v +} + +// GetProxyId returns the ProxyId field value if set, zero value otherwise. +func (o *UpdatekubernetesIntegrationRequest) GetProxyId() string { + if o == nil || IsNil(o.ProxyId) { + var ret string + return ret + } + return *o.ProxyId +} + +// GetProxyIdOk returns a tuple with the ProxyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatekubernetesIntegrationRequest) GetProxyIdOk() (*string, bool) { + if o == nil || IsNil(o.ProxyId) { + return nil, false + } + return o.ProxyId, true +} + +// HasProxyId returns a boolean if a field has been set. +func (o *UpdatekubernetesIntegrationRequest) HasProxyId() bool { + if o != nil && !IsNil(o.ProxyId) { + return true + } + + return false +} + +// SetProxyId gets a reference to the given string and assigns it to the ProxyId field. +func (o *UpdatekubernetesIntegrationRequest) SetProxyId(v string) { + o.ProxyId = &v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *UpdatekubernetesIntegrationRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatekubernetesIntegrationRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *UpdatekubernetesIntegrationRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *UpdatekubernetesIntegrationRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o UpdatekubernetesIntegrationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdatekubernetesIntegrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Parameters) { + toSerialize["parameters"] = o.Parameters + } + if !IsNil(o.ProxyId) { + toSerialize["proxyId"] = o.ProxyId + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdatekubernetesIntegrationRequest) UnmarshalJSON(data []byte) (err error) { + varUpdatekubernetesIntegrationRequest := _UpdatekubernetesIntegrationRequest{} + + err = json.Unmarshal(data, &varUpdatekubernetesIntegrationRequest) + + if err != nil { + return err + } + + *o = UpdatekubernetesIntegrationRequest(varUpdatekubernetesIntegrationRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "parameters") + delete(additionalProperties, "proxyId") + delete(additionalProperties, "projectIds") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdatekubernetesIntegrationRequest struct { + value *UpdatekubernetesIntegrationRequest + isSet bool +} + +func (v NullableUpdatekubernetesIntegrationRequest) Get() *UpdatekubernetesIntegrationRequest { + return v.value +} + +func (v *NullableUpdatekubernetesIntegrationRequest) Set(val *UpdatekubernetesIntegrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdatekubernetesIntegrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdatekubernetesIntegrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdatekubernetesIntegrationRequest(val *UpdatekubernetesIntegrationRequest) *NullableUpdatekubernetesIntegrationRequest { + return &NullableUpdatekubernetesIntegrationRequest{value: val, isSet: true} +} + +func (v NullableUpdatekubernetesIntegrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdatekubernetesIntegrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_updatekubernetes_integration_request_parameters.go b/pkg/api/v3/model_updatekubernetes_integration_request_parameters.go new file mode 100644 index 00000000..feb8c4d9 --- /dev/null +++ b/pkg/api/v3/model_updatekubernetes_integration_request_parameters.go @@ -0,0 +1,192 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" +) + +// checks if the UpdatekubernetesIntegrationRequestParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdatekubernetesIntegrationRequestParameters{} + +// UpdatekubernetesIntegrationRequestParameters The new parameters of the integration +type UpdatekubernetesIntegrationRequestParameters struct { + Blacklist *CreatekubernetesIntegrationRequestParametersBlacklist `json:"blacklist,omitempty"` + Tags *CreatekubernetesIntegrationRequestParametersTags `json:"tags,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdatekubernetesIntegrationRequestParameters UpdatekubernetesIntegrationRequestParameters + +// NewUpdatekubernetesIntegrationRequestParameters instantiates a new UpdatekubernetesIntegrationRequestParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdatekubernetesIntegrationRequestParameters() *UpdatekubernetesIntegrationRequestParameters { + this := UpdatekubernetesIntegrationRequestParameters{} + return &this +} + +// NewUpdatekubernetesIntegrationRequestParametersWithDefaults instantiates a new UpdatekubernetesIntegrationRequestParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdatekubernetesIntegrationRequestParametersWithDefaults() *UpdatekubernetesIntegrationRequestParameters { + this := UpdatekubernetesIntegrationRequestParameters{} + return &this +} + +// GetBlacklist returns the Blacklist field value if set, zero value otherwise. +func (o *UpdatekubernetesIntegrationRequestParameters) GetBlacklist() CreatekubernetesIntegrationRequestParametersBlacklist { + if o == nil || IsNil(o.Blacklist) { + var ret CreatekubernetesIntegrationRequestParametersBlacklist + return ret + } + return *o.Blacklist +} + +// GetBlacklistOk returns a tuple with the Blacklist field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatekubernetesIntegrationRequestParameters) GetBlacklistOk() (*CreatekubernetesIntegrationRequestParametersBlacklist, bool) { + if o == nil || IsNil(o.Blacklist) { + return nil, false + } + return o.Blacklist, true +} + +// HasBlacklist returns a boolean if a field has been set. +func (o *UpdatekubernetesIntegrationRequestParameters) HasBlacklist() bool { + if o != nil && !IsNil(o.Blacklist) { + return true + } + + return false +} + +// SetBlacklist gets a reference to the given CreatekubernetesIntegrationRequestParametersBlacklist and assigns it to the Blacklist field. +func (o *UpdatekubernetesIntegrationRequestParameters) SetBlacklist(v CreatekubernetesIntegrationRequestParametersBlacklist) { + o.Blacklist = &v +} + +// GetTags returns the Tags field value if set, zero value otherwise. +func (o *UpdatekubernetesIntegrationRequestParameters) GetTags() CreatekubernetesIntegrationRequestParametersTags { + if o == nil || IsNil(o.Tags) { + var ret CreatekubernetesIntegrationRequestParametersTags + return ret + } + return *o.Tags +} + +// GetTagsOk returns a tuple with the Tags field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatekubernetesIntegrationRequestParameters) GetTagsOk() (*CreatekubernetesIntegrationRequestParametersTags, bool) { + if o == nil || IsNil(o.Tags) { + return nil, false + } + return o.Tags, true +} + +// HasTags returns a boolean if a field has been set. +func (o *UpdatekubernetesIntegrationRequestParameters) HasTags() bool { + if o != nil && !IsNil(o.Tags) { + return true + } + + return false +} + +// SetTags gets a reference to the given CreatekubernetesIntegrationRequestParametersTags and assigns it to the Tags field. +func (o *UpdatekubernetesIntegrationRequestParameters) SetTags(v CreatekubernetesIntegrationRequestParametersTags) { + o.Tags = &v +} + +func (o UpdatekubernetesIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdatekubernetesIntegrationRequestParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Blacklist) { + toSerialize["blacklist"] = o.Blacklist + } + if !IsNil(o.Tags) { + toSerialize["tags"] = o.Tags + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdatekubernetesIntegrationRequestParameters) UnmarshalJSON(data []byte) (err error) { + varUpdatekubernetesIntegrationRequestParameters := _UpdatekubernetesIntegrationRequestParameters{} + + err = json.Unmarshal(data, &varUpdatekubernetesIntegrationRequestParameters) + + if err != nil { + return err + } + + *o = UpdatekubernetesIntegrationRequestParameters(varUpdatekubernetesIntegrationRequestParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "blacklist") + delete(additionalProperties, "tags") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdatekubernetesIntegrationRequestParameters struct { + value *UpdatekubernetesIntegrationRequestParameters + isSet bool +} + +func (v NullableUpdatekubernetesIntegrationRequestParameters) Get() *UpdatekubernetesIntegrationRequestParameters { + return v.value +} + +func (v *NullableUpdatekubernetesIntegrationRequestParameters) Set(val *UpdatekubernetesIntegrationRequestParameters) { + v.value = val + v.isSet = true +} + +func (v NullableUpdatekubernetesIntegrationRequestParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdatekubernetesIntegrationRequestParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdatekubernetesIntegrationRequestParameters(val *UpdatekubernetesIntegrationRequestParameters) *NullableUpdatekubernetesIntegrationRequestParameters { + return &NullableUpdatekubernetesIntegrationRequestParameters{value: val, isSet: true} +} + +func (v NullableUpdatekubernetesIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdatekubernetesIntegrationRequestParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_updatewiz_integration_request.go b/pkg/api/v3/model_updatewiz_integration_request.go new file mode 100644 index 00000000..f6aff2b0 --- /dev/null +++ b/pkg/api/v3/model_updatewiz_integration_request.go @@ -0,0 +1,269 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" +) + +// checks if the UpdatewizIntegrationRequest type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdatewizIntegrationRequest{} + +// UpdatewizIntegrationRequest struct for UpdatewizIntegrationRequest +type UpdatewizIntegrationRequest struct { + // The new name of the integration + Name *string `json:"name,omitempty"` + Parameters *UpdatewizIntegrationRequestParameters `json:"parameters,omitempty"` + // Optional proxy ID to attach to the integration + ProxyId *string `json:"proxyId,omitempty"` + // Optional list of project IDs to attach to the integration + ProjectIds []string `json:"projectIds,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdatewizIntegrationRequest UpdatewizIntegrationRequest + +// NewUpdatewizIntegrationRequest instantiates a new UpdatewizIntegrationRequest object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdatewizIntegrationRequest() *UpdatewizIntegrationRequest { + this := UpdatewizIntegrationRequest{} + return &this +} + +// NewUpdatewizIntegrationRequestWithDefaults instantiates a new UpdatewizIntegrationRequest object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdatewizIntegrationRequestWithDefaults() *UpdatewizIntegrationRequest { + this := UpdatewizIntegrationRequest{} + return &this +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *UpdatewizIntegrationRequest) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatewizIntegrationRequest) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *UpdatewizIntegrationRequest) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *UpdatewizIntegrationRequest) SetName(v string) { + o.Name = &v +} + +// GetParameters returns the Parameters field value if set, zero value otherwise. +func (o *UpdatewizIntegrationRequest) GetParameters() UpdatewizIntegrationRequestParameters { + if o == nil || IsNil(o.Parameters) { + var ret UpdatewizIntegrationRequestParameters + return ret + } + return *o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatewizIntegrationRequest) GetParametersOk() (*UpdatewizIntegrationRequestParameters, bool) { + if o == nil || IsNil(o.Parameters) { + return nil, false + } + return o.Parameters, true +} + +// HasParameters returns a boolean if a field has been set. +func (o *UpdatewizIntegrationRequest) HasParameters() bool { + if o != nil && !IsNil(o.Parameters) { + return true + } + + return false +} + +// SetParameters gets a reference to the given UpdatewizIntegrationRequestParameters and assigns it to the Parameters field. +func (o *UpdatewizIntegrationRequest) SetParameters(v UpdatewizIntegrationRequestParameters) { + o.Parameters = &v +} + +// GetProxyId returns the ProxyId field value if set, zero value otherwise. +func (o *UpdatewizIntegrationRequest) GetProxyId() string { + if o == nil || IsNil(o.ProxyId) { + var ret string + return ret + } + return *o.ProxyId +} + +// GetProxyIdOk returns a tuple with the ProxyId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatewizIntegrationRequest) GetProxyIdOk() (*string, bool) { + if o == nil || IsNil(o.ProxyId) { + return nil, false + } + return o.ProxyId, true +} + +// HasProxyId returns a boolean if a field has been set. +func (o *UpdatewizIntegrationRequest) HasProxyId() bool { + if o != nil && !IsNil(o.ProxyId) { + return true + } + + return false +} + +// SetProxyId gets a reference to the given string and assigns it to the ProxyId field. +func (o *UpdatewizIntegrationRequest) SetProxyId(v string) { + o.ProxyId = &v +} + +// GetProjectIds returns the ProjectIds field value if set, zero value otherwise. +func (o *UpdatewizIntegrationRequest) GetProjectIds() []string { + if o == nil || IsNil(o.ProjectIds) { + var ret []string + return ret + } + return o.ProjectIds +} + +// GetProjectIdsOk returns a tuple with the ProjectIds field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatewizIntegrationRequest) GetProjectIdsOk() ([]string, bool) { + if o == nil || IsNil(o.ProjectIds) { + return nil, false + } + return o.ProjectIds, true +} + +// HasProjectIds returns a boolean if a field has been set. +func (o *UpdatewizIntegrationRequest) HasProjectIds() bool { + if o != nil && !IsNil(o.ProjectIds) { + return true + } + + return false +} + +// SetProjectIds gets a reference to the given []string and assigns it to the ProjectIds field. +func (o *UpdatewizIntegrationRequest) SetProjectIds(v []string) { + o.ProjectIds = v +} + +func (o UpdatewizIntegrationRequest) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdatewizIntegrationRequest) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + if !IsNil(o.Parameters) { + toSerialize["parameters"] = o.Parameters + } + if !IsNil(o.ProxyId) { + toSerialize["proxyId"] = o.ProxyId + } + if !IsNil(o.ProjectIds) { + toSerialize["projectIds"] = o.ProjectIds + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdatewizIntegrationRequest) UnmarshalJSON(data []byte) (err error) { + varUpdatewizIntegrationRequest := _UpdatewizIntegrationRequest{} + + err = json.Unmarshal(data, &varUpdatewizIntegrationRequest) + + if err != nil { + return err + } + + *o = UpdatewizIntegrationRequest(varUpdatewizIntegrationRequest) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "name") + delete(additionalProperties, "parameters") + delete(additionalProperties, "proxyId") + delete(additionalProperties, "projectIds") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdatewizIntegrationRequest struct { + value *UpdatewizIntegrationRequest + isSet bool +} + +func (v NullableUpdatewizIntegrationRequest) Get() *UpdatewizIntegrationRequest { + return v.value +} + +func (v *NullableUpdatewizIntegrationRequest) Set(val *UpdatewizIntegrationRequest) { + v.value = val + v.isSet = true +} + +func (v NullableUpdatewizIntegrationRequest) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdatewizIntegrationRequest) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdatewizIntegrationRequest(val *UpdatewizIntegrationRequest) *NullableUpdatewizIntegrationRequest { + return &NullableUpdatewizIntegrationRequest{value: val, isSet: true} +} + +func (v NullableUpdatewizIntegrationRequest) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdatewizIntegrationRequest) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_updatewiz_integration_request_parameters.go b/pkg/api/v3/model_updatewiz_integration_request_parameters.go new file mode 100644 index 00000000..33bc3473 --- /dev/null +++ b/pkg/api/v3/model_updatewiz_integration_request_parameters.go @@ -0,0 +1,292 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the UpdatewizIntegrationRequestParameters type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &UpdatewizIntegrationRequestParameters{} + +// UpdatewizIntegrationRequestParameters The new parameters of the integration +type UpdatewizIntegrationRequestParameters struct { + ClientId string `json:"client_id"` + ClientSecret string `json:"client_secret"` + TokenUri string `json:"token_uri"` + ApiEndpoint string `json:"api_endpoint"` + UploadSeverityLevels []ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS `json:"upload_severity_levels,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _UpdatewizIntegrationRequestParameters UpdatewizIntegrationRequestParameters + +// NewUpdatewizIntegrationRequestParameters instantiates a new UpdatewizIntegrationRequestParameters object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewUpdatewizIntegrationRequestParameters(clientId string, clientSecret string, tokenUri string, apiEndpoint string) *UpdatewizIntegrationRequestParameters { + this := UpdatewizIntegrationRequestParameters{} + this.ClientId = clientId + this.ClientSecret = clientSecret + this.TokenUri = tokenUri + this.ApiEndpoint = apiEndpoint + return &this +} + +// NewUpdatewizIntegrationRequestParametersWithDefaults instantiates a new UpdatewizIntegrationRequestParameters object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewUpdatewizIntegrationRequestParametersWithDefaults() *UpdatewizIntegrationRequestParameters { + this := UpdatewizIntegrationRequestParameters{} + return &this +} + +// GetClientId returns the ClientId field value +func (o *UpdatewizIntegrationRequestParameters) GetClientId() string { + if o == nil { + var ret string + return ret + } + + return o.ClientId +} + +// GetClientIdOk returns a tuple with the ClientId field value +// and a boolean to check if the value has been set. +func (o *UpdatewizIntegrationRequestParameters) GetClientIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientId, true +} + +// SetClientId sets field value +func (o *UpdatewizIntegrationRequestParameters) SetClientId(v string) { + o.ClientId = v +} + +// GetClientSecret returns the ClientSecret field value +func (o *UpdatewizIntegrationRequestParameters) GetClientSecret() string { + if o == nil { + var ret string + return ret + } + + return o.ClientSecret +} + +// GetClientSecretOk returns a tuple with the ClientSecret field value +// and a boolean to check if the value has been set. +func (o *UpdatewizIntegrationRequestParameters) GetClientSecretOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ClientSecret, true +} + +// SetClientSecret sets field value +func (o *UpdatewizIntegrationRequestParameters) SetClientSecret(v string) { + o.ClientSecret = v +} + +// GetTokenUri returns the TokenUri field value +func (o *UpdatewizIntegrationRequestParameters) GetTokenUri() string { + if o == nil { + var ret string + return ret + } + + return o.TokenUri +} + +// GetTokenUriOk returns a tuple with the TokenUri field value +// and a boolean to check if the value has been set. +func (o *UpdatewizIntegrationRequestParameters) GetTokenUriOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.TokenUri, true +} + +// SetTokenUri sets field value +func (o *UpdatewizIntegrationRequestParameters) SetTokenUri(v string) { + o.TokenUri = v +} + +// GetApiEndpoint returns the ApiEndpoint field value +func (o *UpdatewizIntegrationRequestParameters) GetApiEndpoint() string { + if o == nil { + var ret string + return ret + } + + return o.ApiEndpoint +} + +// GetApiEndpointOk returns a tuple with the ApiEndpoint field value +// and a boolean to check if the value has been set. +func (o *UpdatewizIntegrationRequestParameters) GetApiEndpointOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.ApiEndpoint, true +} + +// SetApiEndpoint sets field value +func (o *UpdatewizIntegrationRequestParameters) SetApiEndpoint(v string) { + o.ApiEndpoint = v +} + +// GetUploadSeverityLevels returns the UploadSeverityLevels field value if set, zero value otherwise. +func (o *UpdatewizIntegrationRequestParameters) GetUploadSeverityLevels() []ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS { + if o == nil || IsNil(o.UploadSeverityLevels) { + var ret []ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS + return ret + } + return o.UploadSeverityLevels +} + +// GetUploadSeverityLevelsOk returns a tuple with the UploadSeverityLevels field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *UpdatewizIntegrationRequestParameters) GetUploadSeverityLevelsOk() ([]ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS, bool) { + if o == nil || IsNil(o.UploadSeverityLevels) { + return nil, false + } + return o.UploadSeverityLevels, true +} + +// HasUploadSeverityLevels returns a boolean if a field has been set. +func (o *UpdatewizIntegrationRequestParameters) HasUploadSeverityLevels() bool { + if o != nil && !IsNil(o.UploadSeverityLevels) { + return true + } + + return false +} + +// SetUploadSeverityLevels gets a reference to the given []ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS and assigns it to the UploadSeverityLevels field. +func (o *UpdatewizIntegrationRequestParameters) SetUploadSeverityLevels(v []ENUMPROPERTIESPARAMETERSPROPERTIESUPLOADSEVERITYLEVELSITEMS) { + o.UploadSeverityLevels = v +} + +func (o UpdatewizIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o UpdatewizIntegrationRequestParameters) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["client_id"] = o.ClientId + toSerialize["client_secret"] = o.ClientSecret + toSerialize["token_uri"] = o.TokenUri + toSerialize["api_endpoint"] = o.ApiEndpoint + if !IsNil(o.UploadSeverityLevels) { + toSerialize["upload_severity_levels"] = o.UploadSeverityLevels + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *UpdatewizIntegrationRequestParameters) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "client_id", + "client_secret", + "token_uri", + "api_endpoint", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varUpdatewizIntegrationRequestParameters := _UpdatewizIntegrationRequestParameters{} + + err = json.Unmarshal(data, &varUpdatewizIntegrationRequestParameters) + + if err != nil { + return err + } + + *o = UpdatewizIntegrationRequestParameters(varUpdatewizIntegrationRequestParameters) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "client_id") + delete(additionalProperties, "client_secret") + delete(additionalProperties, "token_uri") + delete(additionalProperties, "api_endpoint") + delete(additionalProperties, "upload_severity_levels") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableUpdatewizIntegrationRequestParameters struct { + value *UpdatewizIntegrationRequestParameters + isSet bool +} + +func (v NullableUpdatewizIntegrationRequestParameters) Get() *UpdatewizIntegrationRequestParameters { + return v.value +} + +func (v *NullableUpdatewizIntegrationRequestParameters) Set(val *UpdatewizIntegrationRequestParameters) { + v.value = val + v.isSet = true +} + +func (v NullableUpdatewizIntegrationRequestParameters) IsSet() bool { + return v.isSet +} + +func (v *NullableUpdatewizIntegrationRequestParameters) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableUpdatewizIntegrationRequestParameters(val *UpdatewizIntegrationRequestParameters) *NullableUpdatewizIntegrationRequestParameters { + return &NullableUpdatewizIntegrationRequestParameters{value: val, isSet: true} +} + +func (v NullableUpdatewizIntegrationRequestParameters) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableUpdatewizIntegrationRequestParameters) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_workflow_detailed.go b/pkg/api/v3/model_workflow_detailed.go new file mode 100644 index 00000000..0390f54d --- /dev/null +++ b/pkg/api/v3/model_workflow_detailed.go @@ -0,0 +1,348 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the WorkflowDetailed type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkflowDetailed{} + +// WorkflowDetailed Detailed information about a workflow +type WorkflowDetailed struct { + // The workflow ID. + Id *string `json:"id,omitempty"` + // The name of the workflow. + Name *string `json:"name,omitempty"` + Trigger ENUMPROPERTIESTRIGGER `json:"trigger"` + // The throttle in milliseconds for the workflow. + ThrottleMs *float32 `json:"throttleMs,omitempty"` + Filters []WorkflowDetailedFiltersInner `json:"filters"` + Actions []WorkflowDetailedActionsInner `json:"actions"` + AdditionalProperties map[string]interface{} +} + +type _WorkflowDetailed WorkflowDetailed + +// NewWorkflowDetailed instantiates a new WorkflowDetailed object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkflowDetailed(trigger ENUMPROPERTIESTRIGGER, filters []WorkflowDetailedFiltersInner, actions []WorkflowDetailedActionsInner) *WorkflowDetailed { + this := WorkflowDetailed{} + var id string = "00000000-0000-0000-0000-000000000000" + this.Id = &id + var name string = "Workflow Name" + this.Name = &name + this.Trigger = trigger + this.Filters = filters + this.Actions = actions + return &this +} + +// NewWorkflowDetailedWithDefaults instantiates a new WorkflowDetailed object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkflowDetailedWithDefaults() *WorkflowDetailed { + this := WorkflowDetailed{} + var id string = "00000000-0000-0000-0000-000000000000" + this.Id = &id + var name string = "Workflow Name" + this.Name = &name + return &this +} + +// GetId returns the Id field value if set, zero value otherwise. +func (o *WorkflowDetailed) GetId() string { + if o == nil || IsNil(o.Id) { + var ret string + return ret + } + return *o.Id +} + +// GetIdOk returns a tuple with the Id field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkflowDetailed) GetIdOk() (*string, bool) { + if o == nil || IsNil(o.Id) { + return nil, false + } + return o.Id, true +} + +// HasId returns a boolean if a field has been set. +func (o *WorkflowDetailed) HasId() bool { + if o != nil && !IsNil(o.Id) { + return true + } + + return false +} + +// SetId gets a reference to the given string and assigns it to the Id field. +func (o *WorkflowDetailed) SetId(v string) { + o.Id = &v +} + +// GetName returns the Name field value if set, zero value otherwise. +func (o *WorkflowDetailed) GetName() string { + if o == nil || IsNil(o.Name) { + var ret string + return ret + } + return *o.Name +} + +// GetNameOk returns a tuple with the Name field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkflowDetailed) GetNameOk() (*string, bool) { + if o == nil || IsNil(o.Name) { + return nil, false + } + return o.Name, true +} + +// HasName returns a boolean if a field has been set. +func (o *WorkflowDetailed) HasName() bool { + if o != nil && !IsNil(o.Name) { + return true + } + + return false +} + +// SetName gets a reference to the given string and assigns it to the Name field. +func (o *WorkflowDetailed) SetName(v string) { + o.Name = &v +} + +// GetTrigger returns the Trigger field value +func (o *WorkflowDetailed) GetTrigger() ENUMPROPERTIESTRIGGER { + if o == nil { + var ret ENUMPROPERTIESTRIGGER + return ret + } + + return o.Trigger +} + +// GetTriggerOk returns a tuple with the Trigger field value +// and a boolean to check if the value has been set. +func (o *WorkflowDetailed) GetTriggerOk() (*ENUMPROPERTIESTRIGGER, bool) { + if o == nil { + return nil, false + } + return &o.Trigger, true +} + +// SetTrigger sets field value +func (o *WorkflowDetailed) SetTrigger(v ENUMPROPERTIESTRIGGER) { + o.Trigger = v +} + +// GetThrottleMs returns the ThrottleMs field value if set, zero value otherwise. +func (o *WorkflowDetailed) GetThrottleMs() float32 { + if o == nil || IsNil(o.ThrottleMs) { + var ret float32 + return ret + } + return *o.ThrottleMs +} + +// GetThrottleMsOk returns a tuple with the ThrottleMs field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkflowDetailed) GetThrottleMsOk() (*float32, bool) { + if o == nil || IsNil(o.ThrottleMs) { + return nil, false + } + return o.ThrottleMs, true +} + +// HasThrottleMs returns a boolean if a field has been set. +func (o *WorkflowDetailed) HasThrottleMs() bool { + if o != nil && !IsNil(o.ThrottleMs) { + return true + } + + return false +} + +// SetThrottleMs gets a reference to the given float32 and assigns it to the ThrottleMs field. +func (o *WorkflowDetailed) SetThrottleMs(v float32) { + o.ThrottleMs = &v +} + +// GetFilters returns the Filters field value +func (o *WorkflowDetailed) GetFilters() []WorkflowDetailedFiltersInner { + if o == nil { + var ret []WorkflowDetailedFiltersInner + return ret + } + + return o.Filters +} + +// GetFiltersOk returns a tuple with the Filters field value +// and a boolean to check if the value has been set. +func (o *WorkflowDetailed) GetFiltersOk() ([]WorkflowDetailedFiltersInner, bool) { + if o == nil { + return nil, false + } + return o.Filters, true +} + +// SetFilters sets field value +func (o *WorkflowDetailed) SetFilters(v []WorkflowDetailedFiltersInner) { + o.Filters = v +} + +// GetActions returns the Actions field value +func (o *WorkflowDetailed) GetActions() []WorkflowDetailedActionsInner { + if o == nil { + var ret []WorkflowDetailedActionsInner + return ret + } + + return o.Actions +} + +// GetActionsOk returns a tuple with the Actions field value +// and a boolean to check if the value has been set. +func (o *WorkflowDetailed) GetActionsOk() ([]WorkflowDetailedActionsInner, bool) { + if o == nil { + return nil, false + } + return o.Actions, true +} + +// SetActions sets field value +func (o *WorkflowDetailed) SetActions(v []WorkflowDetailedActionsInner) { + o.Actions = v +} + +func (o WorkflowDetailed) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkflowDetailed) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if !IsNil(o.Id) { + toSerialize["id"] = o.Id + } + if !IsNil(o.Name) { + toSerialize["name"] = o.Name + } + toSerialize["trigger"] = o.Trigger + if !IsNil(o.ThrottleMs) { + toSerialize["throttleMs"] = o.ThrottleMs + } + toSerialize["filters"] = o.Filters + toSerialize["actions"] = o.Actions + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *WorkflowDetailed) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "trigger", + "filters", + "actions", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkflowDetailed := _WorkflowDetailed{} + + err = json.Unmarshal(data, &varWorkflowDetailed) + + if err != nil { + return err + } + + *o = WorkflowDetailed(varWorkflowDetailed) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "trigger") + delete(additionalProperties, "throttleMs") + delete(additionalProperties, "filters") + delete(additionalProperties, "actions") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableWorkflowDetailed struct { + value *WorkflowDetailed + isSet bool +} + +func (v NullableWorkflowDetailed) Get() *WorkflowDetailed { + return v.value +} + +func (v *NullableWorkflowDetailed) Set(val *WorkflowDetailed) { + v.value = val + v.isSet = true +} + +func (v NullableWorkflowDetailed) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkflowDetailed) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkflowDetailed(val *WorkflowDetailed) *NullableWorkflowDetailed { + return &NullableWorkflowDetailed{value: val, isSet: true} +} + +func (v NullableWorkflowDetailed) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkflowDetailed) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_workflow_detailed_actions_inner.go b/pkg/api/v3/model_workflow_detailed_actions_inner.go new file mode 100644 index 00000000..8c0b70b1 --- /dev/null +++ b/pkg/api/v3/model_workflow_detailed_actions_inner.go @@ -0,0 +1,272 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the WorkflowDetailedActionsInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkflowDetailedActionsInner{} + +// WorkflowDetailedActionsInner struct for WorkflowDetailedActionsInner +type WorkflowDetailedActionsInner struct { + Id string `json:"id"` + Type ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE `json:"type"` + Parameters interface{} `json:"parameters,omitempty"` + Integration *WorkflowDetailedActionsInnerIntegration `json:"integration,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _WorkflowDetailedActionsInner WorkflowDetailedActionsInner + +// NewWorkflowDetailedActionsInner instantiates a new WorkflowDetailedActionsInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkflowDetailedActionsInner(id string, type_ ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE) *WorkflowDetailedActionsInner { + this := WorkflowDetailedActionsInner{} + this.Id = id + this.Type = type_ + return &this +} + +// NewWorkflowDetailedActionsInnerWithDefaults instantiates a new WorkflowDetailedActionsInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkflowDetailedActionsInnerWithDefaults() *WorkflowDetailedActionsInner { + this := WorkflowDetailedActionsInner{} + return &this +} + +// GetId returns the Id field value +func (o *WorkflowDetailedActionsInner) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *WorkflowDetailedActionsInner) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *WorkflowDetailedActionsInner) SetId(v string) { + o.Id = v +} + +// GetType returns the Type field value +func (o *WorkflowDetailedActionsInner) GetType() ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE { + if o == nil { + var ret ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *WorkflowDetailedActionsInner) GetTypeOk() (*ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *WorkflowDetailedActionsInner) SetType(v ENUMPROPERTIESACTIONSITEMSPROPERTIESTYPE) { + o.Type = v +} + +// GetParameters returns the Parameters field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *WorkflowDetailedActionsInner) GetParameters() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Parameters +} + +// GetParametersOk returns a tuple with the Parameters field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *WorkflowDetailedActionsInner) GetParametersOk() (*interface{}, bool) { + if o == nil || IsNil(o.Parameters) { + return nil, false + } + return &o.Parameters, true +} + +// HasParameters returns a boolean if a field has been set. +func (o *WorkflowDetailedActionsInner) HasParameters() bool { + if o != nil && !IsNil(o.Parameters) { + return true + } + + return false +} + +// SetParameters gets a reference to the given interface{} and assigns it to the Parameters field. +func (o *WorkflowDetailedActionsInner) SetParameters(v interface{}) { + o.Parameters = v +} + +// GetIntegration returns the Integration field value if set, zero value otherwise. +func (o *WorkflowDetailedActionsInner) GetIntegration() WorkflowDetailedActionsInnerIntegration { + if o == nil || IsNil(o.Integration) { + var ret WorkflowDetailedActionsInnerIntegration + return ret + } + return *o.Integration +} + +// GetIntegrationOk returns a tuple with the Integration field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkflowDetailedActionsInner) GetIntegrationOk() (*WorkflowDetailedActionsInnerIntegration, bool) { + if o == nil || IsNil(o.Integration) { + return nil, false + } + return o.Integration, true +} + +// HasIntegration returns a boolean if a field has been set. +func (o *WorkflowDetailedActionsInner) HasIntegration() bool { + if o != nil && !IsNil(o.Integration) { + return true + } + + return false +} + +// SetIntegration gets a reference to the given WorkflowDetailedActionsInnerIntegration and assigns it to the Integration field. +func (o *WorkflowDetailedActionsInner) SetIntegration(v WorkflowDetailedActionsInnerIntegration) { + o.Integration = &v +} + +func (o WorkflowDetailedActionsInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkflowDetailedActionsInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["type"] = o.Type + if o.Parameters != nil { + toSerialize["parameters"] = o.Parameters + } + if !IsNil(o.Integration) { + toSerialize["integration"] = o.Integration + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *WorkflowDetailedActionsInner) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkflowDetailedActionsInner := _WorkflowDetailedActionsInner{} + + err = json.Unmarshal(data, &varWorkflowDetailedActionsInner) + + if err != nil { + return err + } + + *o = WorkflowDetailedActionsInner(varWorkflowDetailedActionsInner) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "type") + delete(additionalProperties, "parameters") + delete(additionalProperties, "integration") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableWorkflowDetailedActionsInner struct { + value *WorkflowDetailedActionsInner + isSet bool +} + +func (v NullableWorkflowDetailedActionsInner) Get() *WorkflowDetailedActionsInner { + return v.value +} + +func (v *NullableWorkflowDetailedActionsInner) Set(val *WorkflowDetailedActionsInner) { + v.value = val + v.isSet = true +} + +func (v NullableWorkflowDetailedActionsInner) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkflowDetailedActionsInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkflowDetailedActionsInner(val *WorkflowDetailedActionsInner) *NullableWorkflowDetailedActionsInner { + return &NullableWorkflowDetailedActionsInner{value: val, isSet: true} +} + +func (v NullableWorkflowDetailedActionsInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkflowDetailedActionsInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_workflow_detailed_actions_inner_integration.go b/pkg/api/v3/model_workflow_detailed_actions_inner_integration.go new file mode 100644 index 00000000..edab4448 --- /dev/null +++ b/pkg/api/v3/model_workflow_detailed_actions_inner_integration.go @@ -0,0 +1,226 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the WorkflowDetailedActionsInnerIntegration type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkflowDetailedActionsInnerIntegration{} + +// WorkflowDetailedActionsInnerIntegration struct for WorkflowDetailedActionsInnerIntegration +type WorkflowDetailedActionsInnerIntegration struct { + Id string `json:"id"` + Name string `json:"name"` + Kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND `json:"kind"` + AdditionalProperties map[string]interface{} +} + +type _WorkflowDetailedActionsInnerIntegration WorkflowDetailedActionsInnerIntegration + +// NewWorkflowDetailedActionsInnerIntegration instantiates a new WorkflowDetailedActionsInnerIntegration object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkflowDetailedActionsInnerIntegration(id string, name string, kind ENUMPROPERTIESDATAITEMSPROPERTIESKIND) *WorkflowDetailedActionsInnerIntegration { + this := WorkflowDetailedActionsInnerIntegration{} + this.Id = id + this.Name = name + this.Kind = kind + return &this +} + +// NewWorkflowDetailedActionsInnerIntegrationWithDefaults instantiates a new WorkflowDetailedActionsInnerIntegration object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkflowDetailedActionsInnerIntegrationWithDefaults() *WorkflowDetailedActionsInnerIntegration { + this := WorkflowDetailedActionsInnerIntegration{} + return &this +} + +// GetId returns the Id field value +func (o *WorkflowDetailedActionsInnerIntegration) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *WorkflowDetailedActionsInnerIntegration) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *WorkflowDetailedActionsInnerIntegration) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *WorkflowDetailedActionsInnerIntegration) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *WorkflowDetailedActionsInnerIntegration) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *WorkflowDetailedActionsInnerIntegration) SetName(v string) { + o.Name = v +} + +// GetKind returns the Kind field value +func (o *WorkflowDetailedActionsInnerIntegration) GetKind() ENUMPROPERTIESDATAITEMSPROPERTIESKIND { + if o == nil { + var ret ENUMPROPERTIESDATAITEMSPROPERTIESKIND + return ret + } + + return o.Kind +} + +// GetKindOk returns a tuple with the Kind field value +// and a boolean to check if the value has been set. +func (o *WorkflowDetailedActionsInnerIntegration) GetKindOk() (*ENUMPROPERTIESDATAITEMSPROPERTIESKIND, bool) { + if o == nil { + return nil, false + } + return &o.Kind, true +} + +// SetKind sets field value +func (o *WorkflowDetailedActionsInnerIntegration) SetKind(v ENUMPROPERTIESDATAITEMSPROPERTIESKIND) { + o.Kind = v +} + +func (o WorkflowDetailedActionsInnerIntegration) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkflowDetailedActionsInnerIntegration) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["kind"] = o.Kind + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *WorkflowDetailedActionsInnerIntegration) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "kind", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkflowDetailedActionsInnerIntegration := _WorkflowDetailedActionsInnerIntegration{} + + err = json.Unmarshal(data, &varWorkflowDetailedActionsInnerIntegration) + + if err != nil { + return err + } + + *o = WorkflowDetailedActionsInnerIntegration(varWorkflowDetailedActionsInnerIntegration) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "kind") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableWorkflowDetailedActionsInnerIntegration struct { + value *WorkflowDetailedActionsInnerIntegration + isSet bool +} + +func (v NullableWorkflowDetailedActionsInnerIntegration) Get() *WorkflowDetailedActionsInnerIntegration { + return v.value +} + +func (v *NullableWorkflowDetailedActionsInnerIntegration) Set(val *WorkflowDetailedActionsInnerIntegration) { + v.value = val + v.isSet = true +} + +func (v NullableWorkflowDetailedActionsInnerIntegration) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkflowDetailedActionsInnerIntegration) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkflowDetailedActionsInnerIntegration(val *WorkflowDetailedActionsInnerIntegration) *NullableWorkflowDetailedActionsInnerIntegration { + return &NullableWorkflowDetailedActionsInnerIntegration{value: val, isSet: true} +} + +func (v NullableWorkflowDetailedActionsInnerIntegration) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkflowDetailedActionsInnerIntegration) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_workflow_detailed_filters_inner.go b/pkg/api/v3/model_workflow_detailed_filters_inner.go new file mode 100644 index 00000000..1d921939 --- /dev/null +++ b/pkg/api/v3/model_workflow_detailed_filters_inner.go @@ -0,0 +1,272 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the WorkflowDetailedFiltersInner type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkflowDetailedFiltersInner{} + +// WorkflowDetailedFiltersInner struct for WorkflowDetailedFiltersInner +type WorkflowDetailedFiltersInner struct { + Id string `json:"id"` + Type ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE `json:"type"` + Filter interface{} `json:"filter,omitempty"` + View *WorkflowDetailedFiltersInnerView `json:"view,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _WorkflowDetailedFiltersInner WorkflowDetailedFiltersInner + +// NewWorkflowDetailedFiltersInner instantiates a new WorkflowDetailedFiltersInner object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkflowDetailedFiltersInner(id string, type_ ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE) *WorkflowDetailedFiltersInner { + this := WorkflowDetailedFiltersInner{} + this.Id = id + this.Type = type_ + return &this +} + +// NewWorkflowDetailedFiltersInnerWithDefaults instantiates a new WorkflowDetailedFiltersInner object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkflowDetailedFiltersInnerWithDefaults() *WorkflowDetailedFiltersInner { + this := WorkflowDetailedFiltersInner{} + return &this +} + +// GetId returns the Id field value +func (o *WorkflowDetailedFiltersInner) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *WorkflowDetailedFiltersInner) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *WorkflowDetailedFiltersInner) SetId(v string) { + o.Id = v +} + +// GetType returns the Type field value +func (o *WorkflowDetailedFiltersInner) GetType() ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE { + if o == nil { + var ret ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE + return ret + } + + return o.Type +} + +// GetTypeOk returns a tuple with the Type field value +// and a boolean to check if the value has been set. +func (o *WorkflowDetailedFiltersInner) GetTypeOk() (*ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE, bool) { + if o == nil { + return nil, false + } + return &o.Type, true +} + +// SetType sets field value +func (o *WorkflowDetailedFiltersInner) SetType(v ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE) { + o.Type = v +} + +// GetFilter returns the Filter field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *WorkflowDetailedFiltersInner) GetFilter() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Filter +} + +// GetFilterOk returns a tuple with the Filter field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *WorkflowDetailedFiltersInner) GetFilterOk() (*interface{}, bool) { + if o == nil || IsNil(o.Filter) { + return nil, false + } + return &o.Filter, true +} + +// HasFilter returns a boolean if a field has been set. +func (o *WorkflowDetailedFiltersInner) HasFilter() bool { + if o != nil && !IsNil(o.Filter) { + return true + } + + return false +} + +// SetFilter gets a reference to the given interface{} and assigns it to the Filter field. +func (o *WorkflowDetailedFiltersInner) SetFilter(v interface{}) { + o.Filter = v +} + +// GetView returns the View field value if set, zero value otherwise. +func (o *WorkflowDetailedFiltersInner) GetView() WorkflowDetailedFiltersInnerView { + if o == nil || IsNil(o.View) { + var ret WorkflowDetailedFiltersInnerView + return ret + } + return *o.View +} + +// GetViewOk returns a tuple with the View field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WorkflowDetailedFiltersInner) GetViewOk() (*WorkflowDetailedFiltersInnerView, bool) { + if o == nil || IsNil(o.View) { + return nil, false + } + return o.View, true +} + +// HasView returns a boolean if a field has been set. +func (o *WorkflowDetailedFiltersInner) HasView() bool { + if o != nil && !IsNil(o.View) { + return true + } + + return false +} + +// SetView gets a reference to the given WorkflowDetailedFiltersInnerView and assigns it to the View field. +func (o *WorkflowDetailedFiltersInner) SetView(v WorkflowDetailedFiltersInnerView) { + o.View = &v +} + +func (o WorkflowDetailedFiltersInner) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkflowDetailedFiltersInner) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["type"] = o.Type + if o.Filter != nil { + toSerialize["filter"] = o.Filter + } + if !IsNil(o.View) { + toSerialize["view"] = o.View + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *WorkflowDetailedFiltersInner) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "type", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkflowDetailedFiltersInner := _WorkflowDetailedFiltersInner{} + + err = json.Unmarshal(data, &varWorkflowDetailedFiltersInner) + + if err != nil { + return err + } + + *o = WorkflowDetailedFiltersInner(varWorkflowDetailedFiltersInner) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "type") + delete(additionalProperties, "filter") + delete(additionalProperties, "view") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableWorkflowDetailedFiltersInner struct { + value *WorkflowDetailedFiltersInner + isSet bool +} + +func (v NullableWorkflowDetailedFiltersInner) Get() *WorkflowDetailedFiltersInner { + return v.value +} + +func (v *NullableWorkflowDetailedFiltersInner) Set(val *WorkflowDetailedFiltersInner) { + v.value = val + v.isSet = true +} + +func (v NullableWorkflowDetailedFiltersInner) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkflowDetailedFiltersInner) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkflowDetailedFiltersInner(val *WorkflowDetailedFiltersInner) *NullableWorkflowDetailedFiltersInner { + return &NullableWorkflowDetailedFiltersInner{value: val, isSet: true} +} + +func (v NullableWorkflowDetailedFiltersInner) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkflowDetailedFiltersInner) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/api/v3/model_workflow_detailed_filters_inner_view.go b/pkg/api/v3/model_workflow_detailed_filters_inner_view.go new file mode 100644 index 00000000..d2bd535f --- /dev/null +++ b/pkg/api/v3/model_workflow_detailed_filters_inner_view.go @@ -0,0 +1,264 @@ +/* +Escape Public API + +This API enables you to operate [Escape](https://escape.tech/) programmatically. All requests must be authenticated with a valid API key, provided in the `X-ESCAPE-API-KEY` header. For example: `X-ESCAPE-API-KEY: YOUR_API_KEY`. You can find your API key in the [Escape dashboard](http://app.escape.tech/user/). + +API version: 3.0.0 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package v3 + +import ( + "encoding/json" + "fmt" +) + +// checks if the WorkflowDetailedFiltersInnerView type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &WorkflowDetailedFiltersInnerView{} + +// WorkflowDetailedFiltersInnerView struct for WorkflowDetailedFiltersInnerView +type WorkflowDetailedFiltersInnerView struct { + Id string `json:"id"` + Name string `json:"name"` + Target ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE `json:"target"` + Data interface{} `json:"data,omitempty"` + AdditionalProperties map[string]interface{} +} + +type _WorkflowDetailedFiltersInnerView WorkflowDetailedFiltersInnerView + +// NewWorkflowDetailedFiltersInnerView instantiates a new WorkflowDetailedFiltersInnerView object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewWorkflowDetailedFiltersInnerView(id string, name string, target ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE) *WorkflowDetailedFiltersInnerView { + this := WorkflowDetailedFiltersInnerView{} + this.Id = id + this.Name = name + this.Target = target + return &this +} + +// NewWorkflowDetailedFiltersInnerViewWithDefaults instantiates a new WorkflowDetailedFiltersInnerView object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewWorkflowDetailedFiltersInnerViewWithDefaults() *WorkflowDetailedFiltersInnerView { + this := WorkflowDetailedFiltersInnerView{} + return &this +} + +// GetId returns the Id field value +func (o *WorkflowDetailedFiltersInnerView) GetId() string { + if o == nil { + var ret string + return ret + } + + return o.Id +} + +// GetIdOk returns a tuple with the Id field value +// and a boolean to check if the value has been set. +func (o *WorkflowDetailedFiltersInnerView) GetIdOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Id, true +} + +// SetId sets field value +func (o *WorkflowDetailedFiltersInnerView) SetId(v string) { + o.Id = v +} + +// GetName returns the Name field value +func (o *WorkflowDetailedFiltersInnerView) GetName() string { + if o == nil { + var ret string + return ret + } + + return o.Name +} + +// GetNameOk returns a tuple with the Name field value +// and a boolean to check if the value has been set. +func (o *WorkflowDetailedFiltersInnerView) GetNameOk() (*string, bool) { + if o == nil { + return nil, false + } + return &o.Name, true +} + +// SetName sets field value +func (o *WorkflowDetailedFiltersInnerView) SetName(v string) { + o.Name = v +} + +// GetTarget returns the Target field value +func (o *WorkflowDetailedFiltersInnerView) GetTarget() ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE { + if o == nil { + var ret ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE + return ret + } + + return o.Target +} + +// GetTargetOk returns a tuple with the Target field value +// and a boolean to check if the value has been set. +func (o *WorkflowDetailedFiltersInnerView) GetTargetOk() (*ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE, bool) { + if o == nil { + return nil, false + } + return &o.Target, true +} + +// SetTarget sets field value +func (o *WorkflowDetailedFiltersInnerView) SetTarget(v ENUMPROPERTIESFILTERSITEMSPROPERTIESTYPE) { + o.Target = v +} + +// GetData returns the Data field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *WorkflowDetailedFiltersInnerView) GetData() interface{} { + if o == nil { + var ret interface{} + return ret + } + return o.Data +} + +// GetDataOk returns a tuple with the Data field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *WorkflowDetailedFiltersInnerView) GetDataOk() (*interface{}, bool) { + if o == nil || IsNil(o.Data) { + return nil, false + } + return &o.Data, true +} + +// HasData returns a boolean if a field has been set. +func (o *WorkflowDetailedFiltersInnerView) HasData() bool { + if o != nil && !IsNil(o.Data) { + return true + } + + return false +} + +// SetData gets a reference to the given interface{} and assigns it to the Data field. +func (o *WorkflowDetailedFiltersInnerView) SetData(v interface{}) { + o.Data = v +} + +func (o WorkflowDetailedFiltersInnerView) MarshalJSON() ([]byte, error) { + toSerialize,err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o WorkflowDetailedFiltersInnerView) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + toSerialize["id"] = o.Id + toSerialize["name"] = o.Name + toSerialize["target"] = o.Target + if o.Data != nil { + toSerialize["data"] = o.Data + } + + for key, value := range o.AdditionalProperties { + toSerialize[key] = value + } + + return toSerialize, nil +} + +func (o *WorkflowDetailedFiltersInnerView) UnmarshalJSON(data []byte) (err error) { + // This validates that all required properties are included in the JSON object + // by unmarshalling the object into a generic map with string keys and checking + // that every required field exists as a key in the generic map. + requiredProperties := []string{ + "id", + "name", + "target", + } + + allProperties := make(map[string]interface{}) + + err = json.Unmarshal(data, &allProperties) + + if err != nil { + return err; + } + + for _, requiredProperty := range(requiredProperties) { + if _, exists := allProperties[requiredProperty]; !exists { + return fmt.Errorf("no value given for required property %v", requiredProperty) + } + } + + varWorkflowDetailedFiltersInnerView := _WorkflowDetailedFiltersInnerView{} + + err = json.Unmarshal(data, &varWorkflowDetailedFiltersInnerView) + + if err != nil { + return err + } + + *o = WorkflowDetailedFiltersInnerView(varWorkflowDetailedFiltersInnerView) + + additionalProperties := make(map[string]interface{}) + + if err = json.Unmarshal(data, &additionalProperties); err == nil { + delete(additionalProperties, "id") + delete(additionalProperties, "name") + delete(additionalProperties, "target") + delete(additionalProperties, "data") + o.AdditionalProperties = additionalProperties + } + + return err +} + +type NullableWorkflowDetailedFiltersInnerView struct { + value *WorkflowDetailedFiltersInnerView + isSet bool +} + +func (v NullableWorkflowDetailedFiltersInnerView) Get() *WorkflowDetailedFiltersInnerView { + return v.value +} + +func (v *NullableWorkflowDetailedFiltersInnerView) Set(val *WorkflowDetailedFiltersInnerView) { + v.value = val + v.isSet = true +} + +func (v NullableWorkflowDetailedFiltersInnerView) IsSet() bool { + return v.isSet +} + +func (v *NullableWorkflowDetailedFiltersInnerView) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableWorkflowDetailedFiltersInnerView(val *WorkflowDetailedFiltersInnerView) *NullableWorkflowDetailedFiltersInnerView { + return &NullableWorkflowDetailedFiltersInnerView{value: val, isSet: true} +} + +func (v NullableWorkflowDetailedFiltersInnerView) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableWorkflowDetailedFiltersInnerView) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} + + diff --git a/pkg/locations/kube/main.go b/pkg/locations/kube/main.go index 4d7c1d17..75e4499a 100644 --- a/pkg/locations/kube/main.go +++ b/pkg/locations/kube/main.go @@ -80,9 +80,9 @@ func connectAndRun(ctx context.Context, cfg *rest.Config, isConnected *atomic.Bo asset := v3.NewCreateAssetKUBERNETESCLUSTERRequest( v3.ENUMCLOUDHOSTING_CLOUD_HOSTING, v3.ENUMKUBERNETESCLUSTER_KUBERNETES_CLUSTER, - locationID, ) asset.Name = &locationName + asset.PrivateLocationId = &locationID data, err := asset.MarshalJSON() if err != nil { log.Error("Failed to marshal Kubernetes integration: %s", err) diff --git a/scripts/convert.py b/scripts/convert.py index 1a2836da..d5b0f605 100644 --- a/scripts/convert.py +++ b/scripts/convert.py @@ -205,6 +205,9 @@ def _rec_extract_enums(schema: dict, path: list[str]) -> tuple[dict, dict[str, d "kinds", ] + if "tags" in operation_object and isinstance(operation_object["tags"], list) and "Beta" in operation_object["tags"]: + operation_object["tags"].remove("Beta") + # Normalize list-like query params # - For params backed by arrayOrSingle on the server (initiators, kinds, risks), # expose them as arrays so the client sends repeated query params (form+explode)