diff --git a/contextbasedrestrictionsv1/context_based_restrictions_v1.go b/contextbasedrestrictionsv1/context_based_restrictions_v1.go index aad549b5..952f1ffb 100644 --- a/contextbasedrestrictionsv1/context_based_restrictions_v1.go +++ b/contextbasedrestrictionsv1/context_based_restrictions_v1.go @@ -15,7 +15,7 @@ */ /* - * IBM OpenAPI SDK Code Generator Version: 3.79.0-2eb6af3d-20230905-174838 + * IBM OpenAPI SDK Code Generator Version: 3.81.0-c73a091c-20231026-215706 */ // Package contextbasedrestrictionsv1 : Operations and models for the ContextBasedRestrictionsV1 service @@ -1123,6 +1123,9 @@ type APIType struct { // The actions available for the API type. Actions []Action `json:"actions" validate:"required"` + + // The enforcement modes supported by the API type. + EnforcementModes []string `json:"enforcement_modes,omitempty"` } // UnmarshalAPIType unmarshals an instance of APIType from the specified map of raw messages. @@ -1148,6 +1151,10 @@ func UnmarshalAPIType(m map[string]json.RawMessage, result interface{}) (err err if err != nil { return } + err = core.UnmarshalPrimitive(m, "enforcement_modes", &obj.EnforcementModes) + if err != nil { + return + } reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) return } diff --git a/contextbasedrestrictionsv1/context_based_restrictions_v1_examples_test.go b/contextbasedrestrictionsv1/context_based_restrictions_v1_examples_test.go index 4711f8ed..a5ba9262 100644 --- a/contextbasedrestrictionsv1/context_based_restrictions_v1_examples_test.go +++ b/contextbasedrestrictionsv1/context_based_restrictions_v1_examples_test.go @@ -141,10 +141,18 @@ var _ = Describe(`ContextBasedRestrictionsV1 Examples Tests`, func() { Type: core.StringPtr("ipAddress"), Value: core.StringPtr("169.23.56.234"), } + ipAddressV6Model := &contextbasedrestrictionsv1.AddressIPAddress{ + Type: core.StringPtr("ipAddress"), + Value: core.StringPtr("3ffe:1900:fe21:4545::"), + } ipRangeAddressModel := &contextbasedrestrictionsv1.AddressIPAddressRange{ Type: core.StringPtr("ipRange"), Value: core.StringPtr("169.23.22.0-169.23.22.255"), } + ipRangeAddressV6Model := &contextbasedrestrictionsv1.AddressIPAddressRange{ + Type: core.StringPtr("ipRange"), + Value: core.StringPtr("3ffe:1900:fe21:4545::-3ffe:1900:fe21:6767::"), + } subnetAddressModel := &contextbasedrestrictionsv1.AddressSubnet{ Type: core.StringPtr("subnet"), Value: core.StringPtr("192.0.2.0/24"), @@ -169,7 +177,7 @@ var _ = Describe(`ContextBasedRestrictionsV1 Examples Tests`, func() { createZoneOptions.SetName("an example of zone") createZoneOptions.SetAccountID(accountID) createZoneOptions.SetDescription("this is an example of zone") - createZoneOptions.SetAddresses([]contextbasedrestrictionsv1.AddressIntf{ipAddressModel, ipRangeAddressModel, subnetAddressModel, vpcAddressModel, serviceRefAddressModel}) + createZoneOptions.SetAddresses([]contextbasedrestrictionsv1.AddressIntf{ipAddressModel, ipAddressV6Model, ipRangeAddressModel, ipRangeAddressV6Model, subnetAddressModel, vpcAddressModel, serviceRefAddressModel}) createZoneOptions.SetExcluded([]contextbasedrestrictionsv1.AddressIntf{excludedIPAddressModel}) zone, response, err := contextBasedRestrictionsService.CreateZone(createZoneOptions) diff --git a/contextbasedrestrictionsv1/context_based_restrictions_v1_test.go b/contextbasedrestrictionsv1/context_based_restrictions_v1_test.go index 91199810..8003d805 100644 --- a/contextbasedrestrictionsv1/context_based_restrictions_v1_test.go +++ b/contextbasedrestrictionsv1/context_based_restrictions_v1_test.go @@ -190,7 +190,7 @@ var _ = Describe(`ContextBasedRestrictionsV1`, func() { // Construct an instance of the AddressIPAddress model addressModel := new(contextbasedrestrictionsv1.AddressIPAddress) addressModel.Type = core.StringPtr("ipAddress") - addressModel.Value = core.StringPtr("169.23.56.234, 3ffe:1900:fe21:4545::") + addressModel.Value = core.StringPtr("169.23.56.234") // Construct an instance of the CreateZoneOptions model createZoneOptionsModel := new(contextbasedrestrictionsv1.CreateZoneOptions) @@ -272,7 +272,7 @@ var _ = Describe(`ContextBasedRestrictionsV1`, func() { // Construct an instance of the AddressIPAddress model addressModel := new(contextbasedrestrictionsv1.AddressIPAddress) addressModel.Type = core.StringPtr("ipAddress") - addressModel.Value = core.StringPtr("169.23.56.234, 3ffe:1900:fe21:4545::") + addressModel.Value = core.StringPtr("169.23.56.234") // Construct an instance of the CreateZoneOptions model createZoneOptionsModel := new(contextbasedrestrictionsv1.CreateZoneOptions) @@ -362,7 +362,7 @@ var _ = Describe(`ContextBasedRestrictionsV1`, func() { // Construct an instance of the AddressIPAddress model addressModel := new(contextbasedrestrictionsv1.AddressIPAddress) addressModel.Type = core.StringPtr("ipAddress") - addressModel.Value = core.StringPtr("169.23.56.234, 3ffe:1900:fe21:4545::") + addressModel.Value = core.StringPtr("169.23.56.234") // Construct an instance of the CreateZoneOptions model createZoneOptionsModel := new(contextbasedrestrictionsv1.CreateZoneOptions) @@ -393,7 +393,7 @@ var _ = Describe(`ContextBasedRestrictionsV1`, func() { // Construct an instance of the AddressIPAddress model addressModel := new(contextbasedrestrictionsv1.AddressIPAddress) addressModel.Type = core.StringPtr("ipAddress") - addressModel.Value = core.StringPtr("169.23.56.234, 3ffe:1900:fe21:4545::") + addressModel.Value = core.StringPtr("169.23.56.234") // Construct an instance of the CreateZoneOptions model createZoneOptionsModel := new(contextbasedrestrictionsv1.CreateZoneOptions) @@ -438,7 +438,7 @@ var _ = Describe(`ContextBasedRestrictionsV1`, func() { // Construct an instance of the AddressIPAddress model addressModel := new(contextbasedrestrictionsv1.AddressIPAddress) addressModel.Type = core.StringPtr("ipAddress") - addressModel.Value = core.StringPtr("169.23.56.234, 3ffe:1900:fe21:4545::") + addressModel.Value = core.StringPtr("169.23.56.234") // Construct an instance of the CreateZoneOptions model createZoneOptionsModel := new(contextbasedrestrictionsv1.CreateZoneOptions) @@ -983,7 +983,7 @@ var _ = Describe(`ContextBasedRestrictionsV1`, func() { // Construct an instance of the AddressIPAddress model addressModel := new(contextbasedrestrictionsv1.AddressIPAddress) addressModel.Type = core.StringPtr("ipAddress") - addressModel.Value = core.StringPtr("169.23.56.234, 3ffe:1900:fe21:4545::") + addressModel.Value = core.StringPtr("169.23.56.234") // Construct an instance of the ReplaceZoneOptions model replaceZoneOptionsModel := new(contextbasedrestrictionsv1.ReplaceZoneOptions) @@ -1069,7 +1069,7 @@ var _ = Describe(`ContextBasedRestrictionsV1`, func() { // Construct an instance of the AddressIPAddress model addressModel := new(contextbasedrestrictionsv1.AddressIPAddress) addressModel.Type = core.StringPtr("ipAddress") - addressModel.Value = core.StringPtr("169.23.56.234, 3ffe:1900:fe21:4545::") + addressModel.Value = core.StringPtr("169.23.56.234") // Construct an instance of the ReplaceZoneOptions model replaceZoneOptionsModel := new(contextbasedrestrictionsv1.ReplaceZoneOptions) @@ -1163,7 +1163,7 @@ var _ = Describe(`ContextBasedRestrictionsV1`, func() { // Construct an instance of the AddressIPAddress model addressModel := new(contextbasedrestrictionsv1.AddressIPAddress) addressModel.Type = core.StringPtr("ipAddress") - addressModel.Value = core.StringPtr("169.23.56.234, 3ffe:1900:fe21:4545::") + addressModel.Value = core.StringPtr("169.23.56.234") // Construct an instance of the ReplaceZoneOptions model replaceZoneOptionsModel := new(contextbasedrestrictionsv1.ReplaceZoneOptions) @@ -1196,7 +1196,7 @@ var _ = Describe(`ContextBasedRestrictionsV1`, func() { // Construct an instance of the AddressIPAddress model addressModel := new(contextbasedrestrictionsv1.AddressIPAddress) addressModel.Type = core.StringPtr("ipAddress") - addressModel.Value = core.StringPtr("169.23.56.234, 3ffe:1900:fe21:4545::") + addressModel.Value = core.StringPtr("169.23.56.234") // Construct an instance of the ReplaceZoneOptions model replaceZoneOptionsModel := new(contextbasedrestrictionsv1.ReplaceZoneOptions) @@ -1250,7 +1250,7 @@ var _ = Describe(`ContextBasedRestrictionsV1`, func() { // Construct an instance of the AddressIPAddress model addressModel := new(contextbasedrestrictionsv1.AddressIPAddress) addressModel.Type = core.StringPtr("ipAddress") - addressModel.Value = core.StringPtr("169.23.56.234, 3ffe:1900:fe21:4545::") + addressModel.Value = core.StringPtr("169.23.56.234") // Construct an instance of the ReplaceZoneOptions model replaceZoneOptionsModel := new(contextbasedrestrictionsv1.ReplaceZoneOptions) @@ -3446,7 +3446,7 @@ var _ = Describe(`ContextBasedRestrictionsV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"api_types": [{"api_type_id": "APITypeID", "display_name": "DisplayName", "description": "Description", "type": "Type", "actions": [{"action_id": "ActionID", "description": "Description"}]}]}`) + fmt.Fprintf(res, "%s", `{"api_types": [{"api_type_id": "APITypeID", "display_name": "DisplayName", "description": "Description", "type": "Type", "actions": [{"action_id": "ActionID", "description": "Description"}], "enforcement_modes": ["EnforcementModes"]}]}`) })) }) It(`Invoke ListAvailableServiceOperations successfully with retries`, func() { @@ -3511,7 +3511,7 @@ var _ = Describe(`ContextBasedRestrictionsV1`, func() { // Set mock response res.Header().Set("Content-type", "application/json") res.WriteHeader(200) - fmt.Fprintf(res, "%s", `{"api_types": [{"api_type_id": "APITypeID", "display_name": "DisplayName", "description": "Description", "type": "Type", "actions": [{"action_id": "ActionID", "description": "Description"}]}]}`) + fmt.Fprintf(res, "%s", `{"api_types": [{"api_type_id": "APITypeID", "display_name": "DisplayName", "description": "Description", "type": "Type", "actions": [{"action_id": "ActionID", "description": "Description"}], "enforcement_modes": ["EnforcementModes"]}]}`) })) }) It(`Invoke ListAvailableServiceOperations successfully`, func() { @@ -3698,9 +3698,9 @@ var _ = Describe(`ContextBasedRestrictionsV1`, func() { addressModel := new(contextbasedrestrictionsv1.AddressIPAddress) Expect(addressModel).ToNot(BeNil()) addressModel.Type = core.StringPtr("ipAddress") - addressModel.Value = core.StringPtr("169.23.56.234, 3ffe:1900:fe21:4545::") + addressModel.Value = core.StringPtr("169.23.56.234") Expect(addressModel.Type).To(Equal(core.StringPtr("ipAddress"))) - Expect(addressModel.Value).To(Equal(core.StringPtr("169.23.56.234, 3ffe:1900:fe21:4545::"))) + Expect(addressModel.Value).To(Equal(core.StringPtr("169.23.56.234"))) // Construct an instance of the CreateZoneOptions model createZoneOptionsModel := contextBasedRestrictionsService.NewCreateZoneOptions() @@ -3972,9 +3972,9 @@ var _ = Describe(`ContextBasedRestrictionsV1`, func() { addressModel := new(contextbasedrestrictionsv1.AddressIPAddress) Expect(addressModel).ToNot(BeNil()) addressModel.Type = core.StringPtr("ipAddress") - addressModel.Value = core.StringPtr("169.23.56.234, 3ffe:1900:fe21:4545::") + addressModel.Value = core.StringPtr("169.23.56.234") Expect(addressModel.Type).To(Equal(core.StringPtr("ipAddress"))) - Expect(addressModel.Value).To(Equal(core.StringPtr("169.23.56.234, 3ffe:1900:fe21:4545::"))) + Expect(addressModel.Value).To(Equal(core.StringPtr("169.23.56.234"))) // Construct an instance of the ReplaceZoneOptions model zoneID := "testString"