diff --git a/v5/securityandcompliancecenterapiv3/security_and_compliance_center_v3.go b/v5/securityandcompliancecenterapiv3/security_and_compliance_center_v3.go index dee927b..9bf997e 100644 --- a/v5/securityandcompliancecenterapiv3/security_and_compliance_center_v3.go +++ b/v5/securityandcompliancecenterapiv3/security_and_compliance_center_v3.go @@ -5229,30 +5229,6 @@ func UnmarshalAssessment(m map[string]json.RawMessage, result interface{}) (err return } -// AssessmentPrototype : The necessary fields to include a rule/assessment. -type AssessmentPrototype struct { - // The ID of the rule to target. A list of rules can be obtained from the list_rules method. - AssessmentID *string `json:"assessment_id,omitempty"` - - // Details on the intent of the rule for an assessment. - AssessmentDescription *string `json:"assessment_description,omitempty"` -} - -// UnmarshalAssessmentPrototype unmarshals an instance of AssessmentPrototype from the specified map of raw messages. -func UnmarshalAssessmentPrototype(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(AssessmentPrototype) - err = core.UnmarshalPrimitive(m, "assessment_id", &obj.AssessmentID) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "assessment_description", &obj.AssessmentDescription) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - // AssessmentWithStats : The control specification assessment. type AssessmentWithStats struct { // The assessment ID. @@ -6261,7 +6237,7 @@ type Control struct { Status *string `json:"status,omitempty"` } -// UnmarshalControlPrototype unmarshals an instance of ControlPrototype from the specified map of raw messages. +// UnmarshalControl unmarshals an instance of Control from the specified map of raw messages. func UnmarshalControl(m map[string]json.RawMessage, result interface{}) (err error) { obj := new(Control) err = core.UnmarshalPrimitive(m, "control_name", &obj.ControlName) @@ -6316,45 +6292,9 @@ func UnmarshalControl(m map[string]json.RawMessage, result interface{}) (err err return } -// ControlPrototype : The payload to instantiate a control. -type ControlPrototype struct { - // The ID of the control library that contains the profile. - ControlName *string `json:"control_name" validate:"required"` - - // The association of the control. - ControlCategory *string `json:"control_category" validate:"required"` - - // true if the control can be automated, false if the control cannot. Must be false to be a parent - ControlRequirement *bool `json:"control_requirement" validate:"required"` - - // The ID of the control. - ID *string `json:"control_id,omitempty"` - - // The control description. - ControlDescription *string `json:"control_description,omitempty"` - - // The ID of the parent control. - ControlParent *string `json:"control_parent,omitempty"` - - // The Path of the control - ControlPath *string `json:"control_path,omitempty"` - - // List of control specifications associated with the control. - ControlSpecifications []ControlSpecificationPrototype `json:"control_specifications" validate:"required"` - - // References to a control documentation. - ControlDocs *ControlDoc `json:"control_docs,omitempty"` - - // Details if a control library can be used or not. - Status *string `json:"status,omitempty"` - - // The Tags associated with the ControlPrototype. - ControlTags []string `json:"control_tags,omitempty"` -} - -// NewControlPrototype : Instantiate ControlPrototype (Generic Model Constructor) -func (*SecurityAndComplianceCenterApiV3) NewControlPrototype(controlName string, controlCategory string, controlRequirement bool, controlSpecifications []ControlSpecificationPrototype) (_model *ControlPrototype, err error) { - _model = &ControlPrototype{ +// NewControl: Instantiate Control(Generic Model Constructor) +func (*SecurityAndComplianceCenterApiV3) NewControl(controlName string, controlCategory string, controlRequirement bool, controlSpecifications []ControlSpecification) (_model *Control, err error) { + _model = &Control{ ControlName: core.StringPtr(controlName), ControlCategory: core.StringPtr(controlCategory), ControlRequirement: core.BoolPtr(controlRequirement), @@ -6364,53 +6304,6 @@ func (*SecurityAndComplianceCenterApiV3) NewControlPrototype(controlName string, return } -// UnmarshalControlPrototype unmarshals an instance of ControlPrototype from the specified map of raw messages. -func UnmarshalControlPrototype(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(ControlPrototype) - err = core.UnmarshalPrimitive(m, "control_name", &obj.ControlName) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "control_description", &obj.ControlDescription) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "control_category", &obj.ControlCategory) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "control_id", &obj.ID) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "control_requirement", &obj.ControlRequirement) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "control_parent", &obj.ControlParent) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "control_path", &obj.ControlPath) - if err != nil { - return - } - err = core.UnmarshalModel(m, "control_specifications", &obj.ControlSpecifications, UnmarshalControlSpecificationPrototype) - if err != nil { - return - } - err = core.UnmarshalModel(m, "control_docs", &obj.ControlDocs, UnmarshalControlDoc) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "status", &obj.Status) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - // ControlSpecification : A statement that defines a security/privacy requirement for a Control. type ControlSpecification struct { // The ID of the control. @@ -6491,57 +6384,6 @@ func UnmarshalControlSpecification(m map[string]json.RawMessage, result interfac return } -// ControlSpecificationPrototype : The necessary fields to instantiate a Control Specification. -type ControlSpecificationPrototype struct { - // The ID of the control specification - ID *string `json:"control_specification_id,omitempty"` - - // The ID of the component. The component_id can be found from the 'service_name' using the Get Services method. - ComponentID *string `json:"component_id,omitempty"` - - // The cloud provider the specification is targeting. - Environment *string `json:"environment,omitempty"` - - // Information about the Control Specification. - Description *string `json:"control_specification_description,omitempty"` - - // The detailed list of rules associated with the Specification. - Assessments []AssessmentPrototype `json:"assessments,omitempty"` -} - -// Constants associated with the ControlSpecificationPrototype.Environment property. -// The cloud provider the specification is targeting. -const ( - ControlSpecificationPrototypeEnvironmentIBMCloudConst = "ibm-cloud" -) - -// UnmarshalControlSpecificationPrototype unmarshals an instance of ControlSpecificationPrototype from the specified map of raw messages. -func UnmarshalControlSpecificationPrototype(m map[string]json.RawMessage, result interface{}) (err error) { - obj := new(ControlSpecificationPrototype) - err = core.UnmarshalPrimitive(m, "control_specification_id", &obj.ID) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "component_id", &obj.ComponentID) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "environment", &obj.Environment) - if err != nil { - return - } - err = core.UnmarshalPrimitive(m, "control_specification_description", &obj.Description) - if err != nil { - return - } - err = core.UnmarshalModel(m, "assessments", &obj.Assessments, UnmarshalAssessmentPrototype) - if err != nil { - return - } - reflect.ValueOf(result).Elem().Set(reflect.ValueOf(obj)) - return -} - // ControlSpecificationWithStats : The control specification with compliance stats. type ControlSpecificationWithStats struct { // The control specification ID. @@ -6848,7 +6690,7 @@ type CreateCustomControlLibraryOptions struct { ControlLibraryVersion *string `json:"control_library_version" validate:"required"` // The list of rules that the control library attempts to adhere to. - Controls []ControlPrototype `json:"controls" validate:"required"` + Controls []Control `json:"controls" validate:"required"` // The user account ID. AccountID *string `json:"account_id,omitempty"` @@ -6870,7 +6712,7 @@ const ( ) // NewCreateCustomControlLibraryOptions : Instantiate CreateCustomControlLibraryOptions -func (*SecurityAndComplianceCenterApiV3) NewCreateCustomControlLibraryOptions(instanceID string, controlLibraryName string, controlLibraryDescription string, controlLibraryType string, controlLibraryVersion string, controls []ControlPrototype) *CreateCustomControlLibraryOptions { +func (*SecurityAndComplianceCenterApiV3) NewCreateCustomControlLibraryOptions(instanceID string, controlLibraryName string, controlLibraryDescription string, controlLibraryType string, controlLibraryVersion string, controls []Control) *CreateCustomControlLibraryOptions { return &CreateCustomControlLibraryOptions{ InstanceID: core.StringPtr(instanceID), ControlLibraryName: core.StringPtr(controlLibraryName), @@ -6912,7 +6754,7 @@ func (_options *CreateCustomControlLibraryOptions) SetControlLibraryVersion(cont } // SetControls : Allow user to set Controls -func (_options *CreateCustomControlLibraryOptions) SetControls(controls []ControlPrototype) *CreateCustomControlLibraryOptions { +func (_options *CreateCustomControlLibraryOptions) SetControls(controls []Control) *CreateCustomControlLibraryOptions { _options.Controls = controls return _options } diff --git a/v5/securityandcompliancecenterapiv3/security_and_compliance_center_v3_examples_test.go b/v5/securityandcompliancecenterapiv3/security_and_compliance_center_v3_examples_test.go index 95f0c3c..cfbd2d0 100644 --- a/v5/securityandcompliancecenterapiv3/security_and_compliance_center_v3_examples_test.go +++ b/v5/securityandcompliancecenterapiv3/security_and_compliance_center_v3_examples_test.go @@ -215,26 +215,26 @@ var _ = Describe(`SecurityAndComplianceCenterV3 Examples Tests`, func() { fmt.Println("\nCreateCustomControlLibrary() result:") // begin-create_custom_control_library - assessmentPrototypeModel := &securityandcompliancecenterv3.AssessmentPrototype{ + assessmentPrototypeModel := &securityandcompliancecenterv3.Assessment{ AssessmentID: core.StringPtr("rule-d1bd9f3f-bee1-46c5-9533-da8bba9eed4e"), AssessmentDescription: core.StringPtr("This rule will check on regulation"), } - controlSpecificationPrototypeModel := &securityandcompliancecenterv3.ControlSpecificationPrototype{ + controlSpecificationPrototypeModel := &securityandcompliancecenterv3.ControlSpecification{ ComponentID: core.StringPtr("apprapp"), Environment: core.StringPtr("ibm-cloud"), Description: core.StringPtr("This field is used to describe a control specification"), - Assessments: []securityandcompliancecenterv3.AssessmentPrototype{*assessmentPrototypeModel}, + Assessments: []securityandcompliancecenterv3.Assessment{*assessmentPrototypeModel}, } controlDocModel := &securityandcompliancecenterv3.ControlDoc{} - controlPrototypeModel := &securityandcompliancecenterv3.ControlPrototype{ + controlPrototypeModel := &securityandcompliancecenterv3.Control{ ControlName: core.StringPtr("security"), ControlDescription: core.StringPtr("This is a description of a control"), ControlCategory: core.StringPtr("test-control"), ControlRequirement: core.BoolPtr(true), - ControlSpecifications: []securityandcompliancecenterv3.ControlSpecificationPrototype{*controlSpecificationPrototypeModel}, + ControlSpecifications: []securityandcompliancecenterv3.ControlSpecification{*controlSpecificationPrototypeModel}, ControlDocs: controlDocModel, Status: core.StringPtr("disabled"), } @@ -245,7 +245,7 @@ var _ = Describe(`SecurityAndComplianceCenterV3 Examples Tests`, func() { "This is a custom control library made from the SDK test framework", "custom", "0.0.1", - []securityandcompliancecenterv3.ControlPrototype{*controlPrototypeModel}, + []securityandcompliancecenterv3.Control{*controlPrototypeModel}, ) controlLibrary, response, err := securityAndComplianceCenterService.CreateCustomControlLibrary(createCustomControlLibraryOptions) diff --git a/v5/securityandcompliancecenterapiv3/security_and_compliance_center_v3_integration_test.go b/v5/securityandcompliancecenterapiv3/security_and_compliance_center_v3_integration_test.go index 3fdc9b3..70ded82 100644 --- a/v5/securityandcompliancecenterapiv3/security_and_compliance_center_v3_integration_test.go +++ b/v5/securityandcompliancecenterapiv3/security_and_compliance_center_v3_integration_test.go @@ -267,27 +267,27 @@ var _ = Describe(`SecurityAndComplianceCenterV3 Integration Tests`, func() { shouldSkipTest() }) It(`CreateCustomControlLibrary(createCustomControlLibraryOptions *CreateCustomControlLibraryOptions)`, func() { - assessmentPrototypeModel := &securityandcompliancecenterv3.AssessmentPrototype{ + assessmentPrototypeModel := &securityandcompliancecenterv3.Assessment{ AssessmentID: core.StringPtr("rule-d1bd9f3f-bee1-46c5-9533-da8bba9eed4e"), AssessmentDescription: core.StringPtr("This rule will check on regulation"), } - controlSpecificationPrototypeModel := &securityandcompliancecenterv3.ControlSpecificationPrototype{ + controlSpecificationPrototypeModel := &securityandcompliancecenterv3.ControlSpecification{ ComponentID: core.StringPtr("apprapp"), Environment: core.StringPtr("ibm-cloud"), Description: core.StringPtr("This field is used to describe a control specification"), - Assessments: []securityandcompliancecenterv3.AssessmentPrototype{*assessmentPrototypeModel}, + Assessments: []securityandcompliancecenterv3.Assessment{*assessmentPrototypeModel}, } controlDocModel := &securityandcompliancecenterv3.ControlDoc{} - controlPrototypeModel := &securityandcompliancecenterv3.ControlPrototype{ + controlPrototypeModel := &securityandcompliancecenterv3.Control{ ControlName: core.StringPtr("security"), ControlDescription: core.StringPtr("This control library can be deleted"), ControlCategory: core.StringPtr("test-control"), ControlRequirement: core.BoolPtr(true), ControlParent: core.StringPtr(""), - ControlSpecifications: []securityandcompliancecenterv3.ControlSpecificationPrototype{*controlSpecificationPrototypeModel}, + ControlSpecifications: []securityandcompliancecenterv3.ControlSpecification{*controlSpecificationPrototypeModel}, ControlDocs: controlDocModel, Status: core.StringPtr("disabled"), } @@ -298,7 +298,7 @@ var _ = Describe(`SecurityAndComplianceCenterV3 Integration Tests`, func() { ControlLibraryDescription: core.StringPtr("This is a custom control library made from the SDK test framework"), ControlLibraryType: core.StringPtr("custom"), ControlLibraryVersion: core.StringPtr("0.0.1"), - Controls: []securityandcompliancecenterv3.ControlPrototype{*controlPrototypeModel}, + Controls: []securityandcompliancecenterv3.Control{*controlPrototypeModel}, AccountID: &accountIDForReportLink, } diff --git a/v5/securityandcompliancecenterapiv3/security_and_compliance_center_v3_test.go b/v5/securityandcompliancecenterapiv3/security_and_compliance_center_v3_test.go index 2688f2a..a21736b 100644 --- a/v5/securityandcompliancecenterapiv3/security_and_compliance_center_v3_test.go +++ b/v5/securityandcompliancecenterapiv3/security_and_compliance_center_v3_test.go @@ -3203,16 +3203,16 @@ var _ = Describe(`securityandcompliancecenterapiv3`, func() { Expect(securityAndComplianceCenterService).ToNot(BeNil()) // Construct an instance of the AssessmentPrototype model - assessmentPrototypeModel := new(securityandcompliancecenterapiv3.AssessmentPrototype) + assessmentPrototypeModel := new(securityandcompliancecenterapiv3.Assessment) assessmentPrototypeModel.AssessmentID = core.StringPtr("rule-d1bd9f3f-bee1-46c5-9533-da8bba9eed4e") assessmentPrototypeModel.AssessmentDescription = core.StringPtr("This rule will check on regulation") // Construct an instance of the ControlSpecificationPrototype model - controlSpecificationPrototypeModel := new(securityandcompliancecenterapiv3.ControlSpecificationPrototype) + controlSpecificationPrototypeModel := new(securityandcompliancecenterapiv3.ControlSpecification) controlSpecificationPrototypeModel.ComponentID = core.StringPtr("apprapp") controlSpecificationPrototypeModel.Environment = core.StringPtr("ibm-cloud") controlSpecificationPrototypeModel.Description = core.StringPtr("This field is used to describe a control specification") - controlSpecificationPrototypeModel.Assessments = []securityandcompliancecenterapiv3.AssessmentPrototype{*assessmentPrototypeModel} + controlSpecificationPrototypeModel.Assessments = []securityandcompliancecenterapiv3.Assessment{*assessmentPrototypeModel} // Construct an instance of the ControlDoc model controlDocModel := new(securityandcompliancecenterapiv3.ControlDoc) @@ -3220,13 +3220,13 @@ var _ = Describe(`securityandcompliancecenterapiv3`, func() { controlDocModel.ControlDocsType = core.StringPtr("testString") // Construct an instance of the ControlPrototype model - controlPrototypeModel := new(securityandcompliancecenterapiv3.ControlPrototype) + controlPrototypeModel := new(securityandcompliancecenterapiv3.Control) controlPrototypeModel.ControlName = core.StringPtr("security") controlPrototypeModel.ControlDescription = core.StringPtr("This is a description of a control") controlPrototypeModel.ControlCategory = core.StringPtr("test-control") controlPrototypeModel.ControlRequirement = core.BoolPtr(true) controlPrototypeModel.ControlParent = core.StringPtr("testString") - controlPrototypeModel.ControlSpecifications = []securityandcompliancecenterapiv3.ControlSpecificationPrototype{*controlSpecificationPrototypeModel} + controlPrototypeModel.ControlSpecifications = []securityandcompliancecenterapiv3.ControlSpecification{*controlSpecificationPrototypeModel} controlPrototypeModel.ControlDocs = controlDocModel controlPrototypeModel.Status = core.StringPtr("disabled") @@ -3237,7 +3237,7 @@ var _ = Describe(`securityandcompliancecenterapiv3`, func() { createCustomControlLibraryOptionsModel.ControlLibraryDescription = core.StringPtr("This is a custom control library made from the SDK test framework") createCustomControlLibraryOptionsModel.ControlLibraryType = core.StringPtr("custom") createCustomControlLibraryOptionsModel.ControlLibraryVersion = core.StringPtr("0.0.1") - createCustomControlLibraryOptionsModel.Controls = []securityandcompliancecenterapiv3.ControlPrototype{*controlPrototypeModel} + createCustomControlLibraryOptionsModel.Controls = []securityandcompliancecenterapiv3.Control{*controlPrototypeModel} createCustomControlLibraryOptionsModel.AccountID = core.StringPtr("testString") createCustomControlLibraryOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Expect response parsing to fail since we are receiving a text/plain response @@ -3305,16 +3305,16 @@ var _ = Describe(`securityandcompliancecenterapiv3`, func() { securityAndComplianceCenterService.EnableRetries(0, 0) // Construct an instance of the AssessmentPrototype model - assessmentPrototypeModel := new(securityandcompliancecenterapiv3.AssessmentPrototype) + assessmentPrototypeModel := new(securityandcompliancecenterapiv3.Assessment) assessmentPrototypeModel.AssessmentID = core.StringPtr("rule-d1bd9f3f-bee1-46c5-9533-da8bba9eed4e") assessmentPrototypeModel.AssessmentDescription = core.StringPtr("This rule will check on regulation") // Construct an instance of the ControlSpecificationPrototype model - controlSpecificationPrototypeModel := new(securityandcompliancecenterapiv3.ControlSpecificationPrototype) + controlSpecificationPrototypeModel := new(securityandcompliancecenterapiv3.ControlSpecification) controlSpecificationPrototypeModel.ComponentID = core.StringPtr("apprapp") controlSpecificationPrototypeModel.Environment = core.StringPtr("ibm-cloud") controlSpecificationPrototypeModel.Description = core.StringPtr("This field is used to describe a control specification") - controlSpecificationPrototypeModel.Assessments = []securityandcompliancecenterapiv3.AssessmentPrototype{*assessmentPrototypeModel} + controlSpecificationPrototypeModel.Assessments = []securityandcompliancecenterapiv3.Assessment{*assessmentPrototypeModel} // Construct an instance of the ControlDoc model controlDocModel := new(securityandcompliancecenterapiv3.ControlDoc) @@ -3322,13 +3322,13 @@ var _ = Describe(`securityandcompliancecenterapiv3`, func() { controlDocModel.ControlDocsType = core.StringPtr("testString") // Construct an instance of the ControlPrototype model - controlPrototypeModel := new(securityandcompliancecenterapiv3.ControlPrototype) + controlPrototypeModel := new(securityandcompliancecenterapiv3.Control) controlPrototypeModel.ControlName = core.StringPtr("security") controlPrototypeModel.ControlDescription = core.StringPtr("This is a description of a control") controlPrototypeModel.ControlCategory = core.StringPtr("test-control") controlPrototypeModel.ControlRequirement = core.BoolPtr(true) controlPrototypeModel.ControlParent = core.StringPtr("testString") - controlPrototypeModel.ControlSpecifications = []securityandcompliancecenterapiv3.ControlSpecificationPrototype{*controlSpecificationPrototypeModel} + controlPrototypeModel.ControlSpecifications = []securityandcompliancecenterapiv3.ControlSpecification{*controlSpecificationPrototypeModel} controlPrototypeModel.ControlDocs = controlDocModel controlPrototypeModel.Status = core.StringPtr("disabled") @@ -3339,7 +3339,7 @@ var _ = Describe(`securityandcompliancecenterapiv3`, func() { createCustomControlLibraryOptionsModel.ControlLibraryDescription = core.StringPtr("This is a custom control library made from the SDK test framework") createCustomControlLibraryOptionsModel.ControlLibraryType = core.StringPtr("custom") createCustomControlLibraryOptionsModel.ControlLibraryVersion = core.StringPtr("0.0.1") - createCustomControlLibraryOptionsModel.Controls = []securityandcompliancecenterapiv3.ControlPrototype{*controlPrototypeModel} + createCustomControlLibraryOptionsModel.Controls = []securityandcompliancecenterapiv3.Control{*controlPrototypeModel} createCustomControlLibraryOptionsModel.AccountID = core.StringPtr("testString") createCustomControlLibraryOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -3415,16 +3415,16 @@ var _ = Describe(`securityandcompliancecenterapiv3`, func() { Expect(result).To(BeNil()) // Construct an instance of the AssessmentPrototype model - assessmentPrototypeModel := new(securityandcompliancecenterapiv3.AssessmentPrototype) + assessmentPrototypeModel := new(securityandcompliancecenterapiv3.Assessment) assessmentPrototypeModel.AssessmentID = core.StringPtr("rule-d1bd9f3f-bee1-46c5-9533-da8bba9eed4e") assessmentPrototypeModel.AssessmentDescription = core.StringPtr("This rule will check on regulation") // Construct an instance of the ControlSpecificationPrototype model - controlSpecificationPrototypeModel := new(securityandcompliancecenterapiv3.ControlSpecificationPrototype) + controlSpecificationPrototypeModel := new(securityandcompliancecenterapiv3.ControlSpecification) controlSpecificationPrototypeModel.ComponentID = core.StringPtr("apprapp") controlSpecificationPrototypeModel.Environment = core.StringPtr("ibm-cloud") controlSpecificationPrototypeModel.Description = core.StringPtr("This field is used to describe a control specification") - controlSpecificationPrototypeModel.Assessments = []securityandcompliancecenterapiv3.AssessmentPrototype{*assessmentPrototypeModel} + controlSpecificationPrototypeModel.Assessments = []securityandcompliancecenterapiv3.Assessment{*assessmentPrototypeModel} // Construct an instance of the ControlDoc model controlDocModel := new(securityandcompliancecenterapiv3.ControlDoc) @@ -3432,13 +3432,13 @@ var _ = Describe(`securityandcompliancecenterapiv3`, func() { controlDocModel.ControlDocsType = core.StringPtr("testString") // Construct an instance of the ControlPrototype model - controlPrototypeModel := new(securityandcompliancecenterapiv3.ControlPrototype) + controlPrototypeModel := new(securityandcompliancecenterapiv3.Control) controlPrototypeModel.ControlName = core.StringPtr("security") controlPrototypeModel.ControlDescription = core.StringPtr("This is a description of a control") controlPrototypeModel.ControlCategory = core.StringPtr("test-control") controlPrototypeModel.ControlRequirement = core.BoolPtr(true) controlPrototypeModel.ControlParent = core.StringPtr("testString") - controlPrototypeModel.ControlSpecifications = []securityandcompliancecenterapiv3.ControlSpecificationPrototype{*controlSpecificationPrototypeModel} + controlPrototypeModel.ControlSpecifications = []securityandcompliancecenterapiv3.ControlSpecification{*controlSpecificationPrototypeModel} controlPrototypeModel.ControlDocs = controlDocModel controlPrototypeModel.Status = core.StringPtr("disabled") @@ -3449,7 +3449,7 @@ var _ = Describe(`securityandcompliancecenterapiv3`, func() { createCustomControlLibraryOptionsModel.ControlLibraryDescription = core.StringPtr("This is a custom control library made from the SDK test framework") createCustomControlLibraryOptionsModel.ControlLibraryType = core.StringPtr("custom") createCustomControlLibraryOptionsModel.ControlLibraryVersion = core.StringPtr("0.0.1") - createCustomControlLibraryOptionsModel.Controls = []securityandcompliancecenterapiv3.ControlPrototype{*controlPrototypeModel} + createCustomControlLibraryOptionsModel.Controls = []securityandcompliancecenterapiv3.Control{*controlPrototypeModel} createCustomControlLibraryOptionsModel.AccountID = core.StringPtr("testString") createCustomControlLibraryOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -3468,16 +3468,16 @@ var _ = Describe(`securityandcompliancecenterapiv3`, func() { Expect(securityAndComplianceCenterService).ToNot(BeNil()) // Construct an instance of the AssessmentPrototype model - assessmentPrototypeModel := new(securityandcompliancecenterapiv3.AssessmentPrototype) + assessmentPrototypeModel := new(securityandcompliancecenterapiv3.Assessment) assessmentPrototypeModel.AssessmentID = core.StringPtr("rule-d1bd9f3f-bee1-46c5-9533-da8bba9eed4e") assessmentPrototypeModel.AssessmentDescription = core.StringPtr("This rule will check on regulation") // Construct an instance of the ControlSpecificationPrototype model - controlSpecificationPrototypeModel := new(securityandcompliancecenterapiv3.ControlSpecificationPrototype) + controlSpecificationPrototypeModel := new(securityandcompliancecenterapiv3.ControlSpecification) controlSpecificationPrototypeModel.ComponentID = core.StringPtr("apprapp") controlSpecificationPrototypeModel.Environment = core.StringPtr("ibm-cloud") controlSpecificationPrototypeModel.Description = core.StringPtr("This field is used to describe a control specification") - controlSpecificationPrototypeModel.Assessments = []securityandcompliancecenterapiv3.AssessmentPrototype{*assessmentPrototypeModel} + controlSpecificationPrototypeModel.Assessments = []securityandcompliancecenterapiv3.Assessment{*assessmentPrototypeModel} // Construct an instance of the ControlDoc model controlDocModel := new(securityandcompliancecenterapiv3.ControlDoc) @@ -3485,13 +3485,13 @@ var _ = Describe(`securityandcompliancecenterapiv3`, func() { controlDocModel.ControlDocsType = core.StringPtr("testString") // Construct an instance of the ControlPrototype model - controlPrototypeModel := new(securityandcompliancecenterapiv3.ControlPrototype) + controlPrototypeModel := new(securityandcompliancecenterapiv3.Control) controlPrototypeModel.ControlName = core.StringPtr("security") controlPrototypeModel.ControlDescription = core.StringPtr("This is a description of a control") controlPrototypeModel.ControlCategory = core.StringPtr("test-control") controlPrototypeModel.ControlRequirement = core.BoolPtr(true) controlPrototypeModel.ControlParent = core.StringPtr("testString") - controlPrototypeModel.ControlSpecifications = []securityandcompliancecenterapiv3.ControlSpecificationPrototype{*controlSpecificationPrototypeModel} + controlPrototypeModel.ControlSpecifications = []securityandcompliancecenterapiv3.ControlSpecification{*controlSpecificationPrototypeModel} controlPrototypeModel.ControlDocs = controlDocModel controlPrototypeModel.Status = core.StringPtr("disabled") @@ -3502,7 +3502,7 @@ var _ = Describe(`securityandcompliancecenterapiv3`, func() { createCustomControlLibraryOptionsModel.ControlLibraryDescription = core.StringPtr("This is a custom control library made from the SDK test framework") createCustomControlLibraryOptionsModel.ControlLibraryType = core.StringPtr("custom") createCustomControlLibraryOptionsModel.ControlLibraryVersion = core.StringPtr("0.0.1") - createCustomControlLibraryOptionsModel.Controls = []securityandcompliancecenterapiv3.ControlPrototype{*controlPrototypeModel} + createCustomControlLibraryOptionsModel.Controls = []securityandcompliancecenterapiv3.Control{*controlPrototypeModel} createCustomControlLibraryOptionsModel.AccountID = core.StringPtr("testString") createCustomControlLibraryOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} // Invoke operation with empty URL (negative test) @@ -3543,16 +3543,16 @@ var _ = Describe(`securityandcompliancecenterapiv3`, func() { Expect(securityAndComplianceCenterService).ToNot(BeNil()) // Construct an instance of the AssessmentPrototype model - assessmentPrototypeModel := new(securityandcompliancecenterapiv3.AssessmentPrototype) + assessmentPrototypeModel := new(securityandcompliancecenterapiv3.Assessment) assessmentPrototypeModel.AssessmentID = core.StringPtr("rule-d1bd9f3f-bee1-46c5-9533-da8bba9eed4e") assessmentPrototypeModel.AssessmentDescription = core.StringPtr("This rule will check on regulation") // Construct an instance of the ControlSpecificationPrototype model - controlSpecificationPrototypeModel := new(securityandcompliancecenterapiv3.ControlSpecificationPrototype) + controlSpecificationPrototypeModel := new(securityandcompliancecenterapiv3.ControlSpecification) controlSpecificationPrototypeModel.ComponentID = core.StringPtr("apprapp") controlSpecificationPrototypeModel.Environment = core.StringPtr("ibm-cloud") controlSpecificationPrototypeModel.Description = core.StringPtr("This field is used to describe a control specification") - controlSpecificationPrototypeModel.Assessments = []securityandcompliancecenterapiv3.AssessmentPrototype{*assessmentPrototypeModel} + controlSpecificationPrototypeModel.Assessments = []securityandcompliancecenterapiv3.Assessment{*assessmentPrototypeModel} // Construct an instance of the ControlDoc model controlDocModel := new(securityandcompliancecenterapiv3.ControlDoc) @@ -3560,13 +3560,13 @@ var _ = Describe(`securityandcompliancecenterapiv3`, func() { controlDocModel.ControlDocsType = core.StringPtr("testString") // Construct an instance of the ControlPrototype model - controlPrototypeModel := new(securityandcompliancecenterapiv3.ControlPrototype) + controlPrototypeModel := new(securityandcompliancecenterapiv3.Control) controlPrototypeModel.ControlName = core.StringPtr("security") controlPrototypeModel.ControlDescription = core.StringPtr("This is a description of a control") controlPrototypeModel.ControlCategory = core.StringPtr("test-control") controlPrototypeModel.ControlRequirement = core.BoolPtr(true) controlPrototypeModel.ControlParent = core.StringPtr("testString") - controlPrototypeModel.ControlSpecifications = []securityandcompliancecenterapiv3.ControlSpecificationPrototype{*controlSpecificationPrototypeModel} + controlPrototypeModel.ControlSpecifications = []securityandcompliancecenterapiv3.ControlSpecification{*controlSpecificationPrototypeModel} controlPrototypeModel.ControlDocs = controlDocModel controlPrototypeModel.Status = core.StringPtr("disabled") @@ -3577,7 +3577,7 @@ var _ = Describe(`securityandcompliancecenterapiv3`, func() { createCustomControlLibraryOptionsModel.ControlLibraryDescription = core.StringPtr("This is a custom control library made from the SDK test framework") createCustomControlLibraryOptionsModel.ControlLibraryType = core.StringPtr("custom") createCustomControlLibraryOptionsModel.ControlLibraryVersion = core.StringPtr("0.0.1") - createCustomControlLibraryOptionsModel.Controls = []securityandcompliancecenterapiv3.ControlPrototype{*controlPrototypeModel} + createCustomControlLibraryOptionsModel.Controls = []securityandcompliancecenterapiv3.Control{*controlPrototypeModel} createCustomControlLibraryOptionsModel.AccountID = core.StringPtr("testString") createCustomControlLibraryOptionsModel.Headers = map[string]string{"x-custom-header": "x-custom-value"} @@ -18350,14 +18350,14 @@ var _ = Describe(`securityandcompliancecenterapiv3`, func() { controlName := "testString" controlCategory := "testString" controlRequirement := true - controlSpecifications := []securityandcompliancecenterapiv3.ControlSpecificationPrototype{} - _model, err := securityAndComplianceCenterService.NewControlPrototype(controlName, controlCategory, controlRequirement, controlSpecifications) + controlSpecifications := []securityandcompliancecenterapiv3.ControlSpecification{} + _model, err := securityAndComplianceCenterService.NewControl(controlName, controlCategory, controlRequirement, controlSpecifications) Expect(_model).ToNot(BeNil()) Expect(err).To(BeNil()) }) It(`Invoke NewCreateCustomControlLibraryOptions successfully`, func() { // Construct an instance of the AssessmentPrototype model - assessmentPrototypeModel := new(securityandcompliancecenterapiv3.AssessmentPrototype) + assessmentPrototypeModel := new(securityandcompliancecenterapiv3.Assessment) Expect(assessmentPrototypeModel).ToNot(BeNil()) assessmentPrototypeModel.AssessmentID = core.StringPtr("rule-d1bd9f3f-bee1-46c5-9533-da8bba9eed4e") assessmentPrototypeModel.AssessmentDescription = core.StringPtr("This rule will check on regulation") @@ -18365,16 +18365,16 @@ var _ = Describe(`securityandcompliancecenterapiv3`, func() { Expect(assessmentPrototypeModel.AssessmentDescription).To(Equal(core.StringPtr("This rule will check on regulation"))) // Construct an instance of the ControlSpecificationPrototype model - controlSpecificationPrototypeModel := new(securityandcompliancecenterapiv3.ControlSpecificationPrototype) + controlSpecificationPrototypeModel := new(securityandcompliancecenterapiv3.ControlSpecification) Expect(controlSpecificationPrototypeModel).ToNot(BeNil()) controlSpecificationPrototypeModel.ComponentID = core.StringPtr("apprapp") controlSpecificationPrototypeModel.Environment = core.StringPtr("ibm-cloud") controlSpecificationPrototypeModel.Description = core.StringPtr("This field is used to describe a control specification") - controlSpecificationPrototypeModel.Assessments = []securityandcompliancecenterapiv3.AssessmentPrototype{*assessmentPrototypeModel} + controlSpecificationPrototypeModel.Assessments = []securityandcompliancecenterapiv3.Assessment{*assessmentPrototypeModel} Expect(controlSpecificationPrototypeModel.ComponentID).To(Equal(core.StringPtr("apprapp"))) Expect(controlSpecificationPrototypeModel.Environment).To(Equal(core.StringPtr("ibm-cloud"))) Expect(controlSpecificationPrototypeModel.Description).To(Equal(core.StringPtr("This field is used to describe a control specification"))) - Expect(controlSpecificationPrototypeModel.Assessments).To(Equal([]securityandcompliancecenterapiv3.AssessmentPrototype{*assessmentPrototypeModel})) + Expect(controlSpecificationPrototypeModel.Assessments).To(Equal([]securityandcompliancecenterapiv3.Assessment{*assessmentPrototypeModel})) // Construct an instance of the ControlDoc model controlDocModel := new(securityandcompliancecenterapiv3.ControlDoc) @@ -18385,14 +18385,14 @@ var _ = Describe(`securityandcompliancecenterapiv3`, func() { Expect(controlDocModel.ControlDocsType).To(Equal(core.StringPtr("testString"))) // Construct an instance of the ControlPrototype model - controlPrototypeModel := new(securityandcompliancecenterapiv3.ControlPrototype) + controlPrototypeModel := new(securityandcompliancecenterapiv3.Control) Expect(controlPrototypeModel).ToNot(BeNil()) controlPrototypeModel.ControlName = core.StringPtr("security") controlPrototypeModel.ControlDescription = core.StringPtr("This is a description of a control") controlPrototypeModel.ControlCategory = core.StringPtr("test-control") controlPrototypeModel.ControlRequirement = core.BoolPtr(true) controlPrototypeModel.ControlParent = core.StringPtr("testString") - controlPrototypeModel.ControlSpecifications = []securityandcompliancecenterapiv3.ControlSpecificationPrototype{*controlSpecificationPrototypeModel} + controlPrototypeModel.ControlSpecifications = []securityandcompliancecenterapiv3.ControlSpecification{*controlSpecificationPrototypeModel} controlPrototypeModel.ControlDocs = controlDocModel controlPrototypeModel.Status = core.StringPtr("disabled") Expect(controlPrototypeModel.ControlName).To(Equal(core.StringPtr("security"))) @@ -18400,7 +18400,7 @@ var _ = Describe(`securityandcompliancecenterapiv3`, func() { Expect(controlPrototypeModel.ControlCategory).To(Equal(core.StringPtr("test-control"))) Expect(controlPrototypeModel.ControlRequirement).To(Equal(core.BoolPtr(true))) Expect(controlPrototypeModel.ControlParent).To(Equal(core.StringPtr("testString"))) - Expect(controlPrototypeModel.ControlSpecifications).To(Equal([]securityandcompliancecenterapiv3.ControlSpecificationPrototype{*controlSpecificationPrototypeModel})) + Expect(controlPrototypeModel.ControlSpecifications).To(Equal([]securityandcompliancecenterapiv3.ControlSpecification{*controlSpecificationPrototypeModel})) Expect(controlPrototypeModel.ControlDocs).To(Equal(controlDocModel)) Expect(controlPrototypeModel.Status).To(Equal(core.StringPtr("disabled"))) @@ -18410,14 +18410,14 @@ var _ = Describe(`securityandcompliancecenterapiv3`, func() { createCustomControlLibraryOptionsControlLibraryDescription := "This is a custom control library made from the SDK test framework" createCustomControlLibraryOptionsControlLibraryType := "custom" createCustomControlLibraryOptionsControlLibraryVersion := "0.0.1" - createCustomControlLibraryOptionsControls := []securityandcompliancecenterapiv3.ControlPrototype{} + createCustomControlLibraryOptionsControls := []securityandcompliancecenterapiv3.Control{} createCustomControlLibraryOptionsModel := securityAndComplianceCenterService.NewCreateCustomControlLibraryOptions(instanceID, createCustomControlLibraryOptionsControlLibraryName, createCustomControlLibraryOptionsControlLibraryDescription, createCustomControlLibraryOptionsControlLibraryType, createCustomControlLibraryOptionsControlLibraryVersion, createCustomControlLibraryOptionsControls) createCustomControlLibraryOptionsModel.SetInstanceID("acd7032c-15a3-484f-bf5b-67d41534d940") createCustomControlLibraryOptionsModel.SetControlLibraryName("custom control library from SDK") createCustomControlLibraryOptionsModel.SetControlLibraryDescription("This is a custom control library made from the SDK test framework") createCustomControlLibraryOptionsModel.SetControlLibraryType("custom") createCustomControlLibraryOptionsModel.SetControlLibraryVersion("0.0.1") - createCustomControlLibraryOptionsModel.SetControls([]securityandcompliancecenterapiv3.ControlPrototype{*controlPrototypeModel}) + createCustomControlLibraryOptionsModel.SetControls([]securityandcompliancecenterapiv3.Control{*controlPrototypeModel}) createCustomControlLibraryOptionsModel.SetAccountID("testString") createCustomControlLibraryOptionsModel.SetHeaders(map[string]string{"foo": "bar"}) Expect(createCustomControlLibraryOptionsModel).ToNot(BeNil()) @@ -18426,7 +18426,7 @@ var _ = Describe(`securityandcompliancecenterapiv3`, func() { Expect(createCustomControlLibraryOptionsModel.ControlLibraryDescription).To(Equal(core.StringPtr("This is a custom control library made from the SDK test framework"))) Expect(createCustomControlLibraryOptionsModel.ControlLibraryType).To(Equal(core.StringPtr("custom"))) Expect(createCustomControlLibraryOptionsModel.ControlLibraryVersion).To(Equal(core.StringPtr("0.0.1"))) - Expect(createCustomControlLibraryOptionsModel.Controls).To(Equal([]securityandcompliancecenterapiv3.ControlPrototype{*controlPrototypeModel})) + Expect(createCustomControlLibraryOptionsModel.Controls).To(Equal([]securityandcompliancecenterapiv3.Control{*controlPrototypeModel})) Expect(createCustomControlLibraryOptionsModel.AccountID).To(Equal(core.StringPtr("testString"))) Expect(createCustomControlLibraryOptionsModel.Headers).To(Equal(map[string]string{"foo": "bar"})) })