From fca60ce55af130a1a3aee45eb181deea92b6a94c Mon Sep 17 00:00:00 2001 From: powervs-ibm <137309855+powervs-ibm@users.noreply.github.com> Date: Fri, 23 Aug 2024 13:01:34 -0500 Subject: [PATCH] Update [M]NAg,NSG: member, rules; SysPool: CoreIncrement SB commit c78e75aa6d199faa5196e1bac0488071a074b8c9 (#451) --- ...address_groups_members_delete_responses.go | 8 +- ...k_address_groups_members_post_responses.go | 6 +- ...k_security_groups_action_post_responses.go | 76 +++++++++++++++++++ ...ecurity_groups_members_delete_responses.go | 8 +- ..._security_groups_members_post_responses.go | 6 +- ..._security_groups_rules_delete_responses.go | 8 +- ...rk_security_groups_rules_post_responses.go | 6 +- .../network_security_group_rule_port.go | 4 +- 8 files changed, 96 insertions(+), 26 deletions(-) diff --git a/power/client/network_address_groups/v1_network_address_groups_members_delete_responses.go b/power/client/network_address_groups/v1_network_address_groups_members_delete_responses.go index 86199912..6105c1f6 100644 --- a/power/client/network_address_groups/v1_network_address_groups_members_delete_responses.go +++ b/power/client/network_address_groups/v1_network_address_groups_members_delete_responses.go @@ -82,7 +82,7 @@ V1NetworkAddressGroupsMembersDeleteOK describes a response with status code 200, OK */ type V1NetworkAddressGroupsMembersDeleteOK struct { - Payload *models.NetworkAddressGroup + Payload models.Object } // IsSuccess returns true when this v1 network address groups members delete o k response has a 2xx status code @@ -125,16 +125,14 @@ func (o *V1NetworkAddressGroupsMembersDeleteOK) String() string { return fmt.Sprintf("[DELETE /v1/network-address-groups/{network_address_group_id}/members/{network_address_group_member_id}][%d] v1NetworkAddressGroupsMembersDeleteOK %s", 200, payload) } -func (o *V1NetworkAddressGroupsMembersDeleteOK) GetPayload() *models.NetworkAddressGroup { +func (o *V1NetworkAddressGroupsMembersDeleteOK) GetPayload() models.Object { return o.Payload } func (o *V1NetworkAddressGroupsMembersDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.NetworkAddressGroup) - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err } diff --git a/power/client/network_address_groups/v1_network_address_groups_members_post_responses.go b/power/client/network_address_groups/v1_network_address_groups_members_post_responses.go index 76f6e5e0..ea8d2ce3 100644 --- a/power/client/network_address_groups/v1_network_address_groups_members_post_responses.go +++ b/power/client/network_address_groups/v1_network_address_groups_members_post_responses.go @@ -88,7 +88,7 @@ V1NetworkAddressGroupsMembersPostOK describes a response with status code 200, w OK */ type V1NetworkAddressGroupsMembersPostOK struct { - Payload *models.NetworkAddressGroup + Payload *models.NetworkAddressGroupMember } // IsSuccess returns true when this v1 network address groups members post o k response has a 2xx status code @@ -131,13 +131,13 @@ func (o *V1NetworkAddressGroupsMembersPostOK) String() string { return fmt.Sprintf("[POST /v1/network-address-groups/{network_address_group_id}/members][%d] v1NetworkAddressGroupsMembersPostOK %s", 200, payload) } -func (o *V1NetworkAddressGroupsMembersPostOK) GetPayload() *models.NetworkAddressGroup { +func (o *V1NetworkAddressGroupsMembersPostOK) GetPayload() *models.NetworkAddressGroupMember { return o.Payload } func (o *V1NetworkAddressGroupsMembersPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.NetworkAddressGroup) + o.Payload = new(models.NetworkAddressGroupMember) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/power/client/network_security_groups/v1_network_security_groups_action_post_responses.go b/power/client/network_security_groups/v1_network_security_groups_action_post_responses.go index 2baaa04e..b1536f9f 100644 --- a/power/client/network_security_groups/v1_network_security_groups_action_post_responses.go +++ b/power/client/network_security_groups/v1_network_security_groups_action_post_responses.go @@ -72,6 +72,12 @@ func (o *V1NetworkSecurityGroupsActionPostReader) ReadResponse(response runtime. return nil, err } return nil, result + case 550: + result := NewV1NetworkSecurityGroupsActionPostStatus550() + if err := result.readResponse(response, consumer, o.formats); err != nil { + return nil, err + } + return nil, result default: return nil, runtime.NewAPIError("[POST /v1/network-security-groups/action] v1.networkSecurityGroups.action.post", response, response.Code()) } @@ -632,3 +638,73 @@ func (o *V1NetworkSecurityGroupsActionPostInternalServerError) readResponse(resp return nil } + +// NewV1NetworkSecurityGroupsActionPostStatus550 creates a V1NetworkSecurityGroupsActionPostStatus550 with default headers values +func NewV1NetworkSecurityGroupsActionPostStatus550() *V1NetworkSecurityGroupsActionPostStatus550 { + return &V1NetworkSecurityGroupsActionPostStatus550{} +} + +/* +V1NetworkSecurityGroupsActionPostStatus550 describes a response with status code 550, with default header values. + +Workspace Status Error +*/ +type V1NetworkSecurityGroupsActionPostStatus550 struct { + Payload *models.Error +} + +// IsSuccess returns true when this v1 network security groups action post status550 response has a 2xx status code +func (o *V1NetworkSecurityGroupsActionPostStatus550) IsSuccess() bool { + return false +} + +// IsRedirect returns true when this v1 network security groups action post status550 response has a 3xx status code +func (o *V1NetworkSecurityGroupsActionPostStatus550) IsRedirect() bool { + return false +} + +// IsClientError returns true when this v1 network security groups action post status550 response has a 4xx status code +func (o *V1NetworkSecurityGroupsActionPostStatus550) IsClientError() bool { + return false +} + +// IsServerError returns true when this v1 network security groups action post status550 response has a 5xx status code +func (o *V1NetworkSecurityGroupsActionPostStatus550) IsServerError() bool { + return true +} + +// IsCode returns true when this v1 network security groups action post status550 response a status code equal to that given +func (o *V1NetworkSecurityGroupsActionPostStatus550) IsCode(code int) bool { + return code == 550 +} + +// Code gets the status code for the v1 network security groups action post status550 response +func (o *V1NetworkSecurityGroupsActionPostStatus550) Code() int { + return 550 +} + +func (o *V1NetworkSecurityGroupsActionPostStatus550) Error() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-security-groups/action][%d] v1NetworkSecurityGroupsActionPostStatus550 %s", 550, payload) +} + +func (o *V1NetworkSecurityGroupsActionPostStatus550) String() string { + payload, _ := json.Marshal(o.Payload) + return fmt.Sprintf("[POST /v1/network-security-groups/action][%d] v1NetworkSecurityGroupsActionPostStatus550 %s", 550, payload) +} + +func (o *V1NetworkSecurityGroupsActionPostStatus550) GetPayload() *models.Error { + return o.Payload +} + +func (o *V1NetworkSecurityGroupsActionPostStatus550) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { + + o.Payload = new(models.Error) + + // response payload + if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + return err + } + + return nil +} diff --git a/power/client/network_security_groups/v1_network_security_groups_members_delete_responses.go b/power/client/network_security_groups/v1_network_security_groups_members_delete_responses.go index 8d5336ab..da71f1b2 100644 --- a/power/client/network_security_groups/v1_network_security_groups_members_delete_responses.go +++ b/power/client/network_security_groups/v1_network_security_groups_members_delete_responses.go @@ -82,7 +82,7 @@ V1NetworkSecurityGroupsMembersDeleteOK describes a response with status code 200 OK */ type V1NetworkSecurityGroupsMembersDeleteOK struct { - Payload *models.NetworkSecurityGroup + Payload models.Object } // IsSuccess returns true when this v1 network security groups members delete o k response has a 2xx status code @@ -125,16 +125,14 @@ func (o *V1NetworkSecurityGroupsMembersDeleteOK) String() string { return fmt.Sprintf("[DELETE /v1/network-security-groups/{network_security_group_id}/members/{network_security_group_member_id}][%d] v1NetworkSecurityGroupsMembersDeleteOK %s", 200, payload) } -func (o *V1NetworkSecurityGroupsMembersDeleteOK) GetPayload() *models.NetworkSecurityGroup { +func (o *V1NetworkSecurityGroupsMembersDeleteOK) GetPayload() models.Object { return o.Payload } func (o *V1NetworkSecurityGroupsMembersDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.NetworkSecurityGroup) - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err } diff --git a/power/client/network_security_groups/v1_network_security_groups_members_post_responses.go b/power/client/network_security_groups/v1_network_security_groups_members_post_responses.go index 41faba80..c273addc 100644 --- a/power/client/network_security_groups/v1_network_security_groups_members_post_responses.go +++ b/power/client/network_security_groups/v1_network_security_groups_members_post_responses.go @@ -88,7 +88,7 @@ V1NetworkSecurityGroupsMembersPostOK describes a response with status code 200, OK */ type V1NetworkSecurityGroupsMembersPostOK struct { - Payload *models.NetworkSecurityGroup + Payload *models.NetworkSecurityGroupMember } // IsSuccess returns true when this v1 network security groups members post o k response has a 2xx status code @@ -131,13 +131,13 @@ func (o *V1NetworkSecurityGroupsMembersPostOK) String() string { return fmt.Sprintf("[POST /v1/network-security-groups/{network_security_group_id}/members][%d] v1NetworkSecurityGroupsMembersPostOK %s", 200, payload) } -func (o *V1NetworkSecurityGroupsMembersPostOK) GetPayload() *models.NetworkSecurityGroup { +func (o *V1NetworkSecurityGroupsMembersPostOK) GetPayload() *models.NetworkSecurityGroupMember { return o.Payload } func (o *V1NetworkSecurityGroupsMembersPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.NetworkSecurityGroup) + o.Payload = new(models.NetworkSecurityGroupMember) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/power/client/network_security_groups/v1_network_security_groups_rules_delete_responses.go b/power/client/network_security_groups/v1_network_security_groups_rules_delete_responses.go index d7aec462..e318eb64 100644 --- a/power/client/network_security_groups/v1_network_security_groups_rules_delete_responses.go +++ b/power/client/network_security_groups/v1_network_security_groups_rules_delete_responses.go @@ -82,7 +82,7 @@ V1NetworkSecurityGroupsRulesDeleteOK describes a response with status code 200, OK */ type V1NetworkSecurityGroupsRulesDeleteOK struct { - Payload *models.NetworkSecurityGroup + Payload models.Object } // IsSuccess returns true when this v1 network security groups rules delete o k response has a 2xx status code @@ -125,16 +125,14 @@ func (o *V1NetworkSecurityGroupsRulesDeleteOK) String() string { return fmt.Sprintf("[DELETE /v1/network-security-groups/{network_security_group_id}/rules/{network_security_group_rule_id}][%d] v1NetworkSecurityGroupsRulesDeleteOK %s", 200, payload) } -func (o *V1NetworkSecurityGroupsRulesDeleteOK) GetPayload() *models.NetworkSecurityGroup { +func (o *V1NetworkSecurityGroupsRulesDeleteOK) GetPayload() models.Object { return o.Payload } func (o *V1NetworkSecurityGroupsRulesDeleteOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.NetworkSecurityGroup) - // response payload - if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { + if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF { return err } diff --git a/power/client/network_security_groups/v1_network_security_groups_rules_post_responses.go b/power/client/network_security_groups/v1_network_security_groups_rules_post_responses.go index 27ae7369..5d519da4 100644 --- a/power/client/network_security_groups/v1_network_security_groups_rules_post_responses.go +++ b/power/client/network_security_groups/v1_network_security_groups_rules_post_responses.go @@ -88,7 +88,7 @@ V1NetworkSecurityGroupsRulesPostOK describes a response with status code 200, wi OK */ type V1NetworkSecurityGroupsRulesPostOK struct { - Payload *models.NetworkSecurityGroup + Payload *models.NetworkSecurityGroupRule } // IsSuccess returns true when this v1 network security groups rules post o k response has a 2xx status code @@ -131,13 +131,13 @@ func (o *V1NetworkSecurityGroupsRulesPostOK) String() string { return fmt.Sprintf("[POST /v1/network-security-groups/{network_security_group_id}/rules][%d] v1NetworkSecurityGroupsRulesPostOK %s", 200, payload) } -func (o *V1NetworkSecurityGroupsRulesPostOK) GetPayload() *models.NetworkSecurityGroup { +func (o *V1NetworkSecurityGroupsRulesPostOK) GetPayload() *models.NetworkSecurityGroupRule { return o.Payload } func (o *V1NetworkSecurityGroupsRulesPostOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error { - o.Payload = new(models.NetworkSecurityGroup) + o.Payload = new(models.NetworkSecurityGroupRule) // response payload if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF { diff --git a/power/models/network_security_group_rule_port.go b/power/models/network_security_group_rule_port.go index 9038f803..bb8cc5f5 100644 --- a/power/models/network_security_group_rule_port.go +++ b/power/models/network_security_group_rule_port.go @@ -18,10 +18,10 @@ import ( type NetworkSecurityGroupRulePort struct { // The end of the port range, if applicable, If values are not present then all ports are in the range - Maximum float64 `json:"maximum,omitempty"` + Maximum int64 `json:"maximum,omitempty"` // The start of the port range, if applicable. If values are not present then all ports are in the range - Minimum float64 `json:"minimum,omitempty"` + Minimum int64 `json:"minimum,omitempty"` } // Validate validates this network security group rule port