diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/CHANGELOG.md b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/CHANGELOG.md index f39c33c81091..27bdd9cd3c15 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/CHANGELOG.md +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/CHANGELOG.md @@ -1,5 +1,33 @@ # Release History +## 2.1.0-beta.1 (2026-08-21) +### Features Added + +- New value `SummaryTypeCve`, `SummaryTypePasswordHash`, `SummaryTypeSbom`, `SummaryTypeUnsafeFunctionCalls` added to enum type `SummaryType` +- New enum type `ExploitMaturityLevel` with values `ExploitMaturityLevelAttacked`, `ExploitMaturityLevelNotDefined`, `ExploitMaturityLevelProofOfConcept`, `ExploitMaturityLevelUnreported` +- New enum type `RansomwareCampaignUse` with values `RansomwareCampaignUseKnown`, `RansomwareCampaignUseUnknown` +- New function `*ClientFactory.NewUnsafeFunctionCallsClient() *UnsafeFunctionCallsClient` +- New function `*CveSummaryResource.GetSummaryResourceProperties() *SummaryResourceProperties` +- New function `*PasswordHashSummaryResource.GetSummaryResourceProperties() *SummaryResourceProperties` +- New function `*SbomSummaryResource.GetSummaryResourceProperties() *SummaryResourceProperties` +- New function `NewUnsafeFunctionCallsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UnsafeFunctionCallsClient, error)` +- New function `*UnsafeFunctionCallsClient.NewListByFirmwarePager(resourceGroupName string, workspaceName string, firmwareID string, options *UnsafeFunctionCallsClientListByFirmwareOptions) *runtime.Pager[UnsafeFunctionCallsClientListByFirmwareResponse]` +- New function `*UnsafeFunctionCallsSummaryResource.GetSummaryResourceProperties() *SummaryResourceProperties` +- New struct `CveSummaryResource` +- New struct `CweProperties` +- New struct `EpssProperties` +- New struct `FunctionCall` +- New struct `KevProperties` +- New struct `PasswordHashSummaryResource` +- New struct `SbomSummaryResource` +- New struct `UnsafeFunctionCallsResource` +- New struct `UnsafeFunctionCallsResourceListResult` +- New struct `UnsafeFunctionCallsResult` +- New struct `UnsafeFunctionCallsSummaryResource` +- New field `Cwes`, `EffectiveExploitMaturity`, `EffectiveVectorString`, `Epss`, `FixedInVersions`, `Kev` in struct `CveResult` +- New field `ExploitMaturity`, `VectorString` in struct `CvssScore` + + ## 2.0.0 (2025-09-01) ### Breaking Changes diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/binaryhardening_client.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/binaryhardening_client.go index 3edc5a1e2154..a3e89b117fa5 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/binaryhardening_client.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/binaryhardening_client.go @@ -19,7 +19,7 @@ import ( // BinaryHardeningClient contains the methods for the BinaryHardening group. // Don't use this type directly, use NewBinaryHardeningClient() instead. // -// Generated from API version 2025-08-02 +// Generated from API version 2026-06-01-preview type BinaryHardeningClient struct { internal *arm.Client subscriptionID string @@ -104,7 +104,7 @@ func (client *BinaryHardeningClient) listByFirmwareCreateRequest(ctx context.Con } if firstPage { reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") req.Raw().Header["Accept"] = []string{"application/json"} } diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/binaryhardening_client_example_test.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/binaryhardening_client_example_test.go index 1353c548e7c6..87a860bdb373 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/binaryhardening_client_example_test.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/binaryhardening_client_example_test.go @@ -11,7 +11,7 @@ import ( "log" ) -// Generated from example definition: 2025-08-02/BinaryHardening_ListByFirmware_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/BinaryHardening_ListByFirmware_MaximumSet_Gen.json func ExampleBinaryHardeningClient_NewListByFirmwarePager_binaryHardeningListByFirmwareMaximumSetGenGeneratedByMaximumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -72,7 +72,7 @@ func ExampleBinaryHardeningClient_NewListByFirmwarePager_binaryHardeningListByFi } } -// Generated from example definition: 2025-08-02/BinaryHardening_ListByFirmware_MinimumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/BinaryHardening_ListByFirmware_MinimumSet_Gen.json func ExampleBinaryHardeningClient_NewListByFirmwarePager_binaryHardeningListByFirmwareMinimumSetGen() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/client_factory.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/client_factory.go index 51a8b6e7da24..25e1937e6aef 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/client_factory.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/client_factory.go @@ -103,6 +103,14 @@ func (c *ClientFactory) NewSummariesClient() *SummariesClient { } } +// NewUnsafeFunctionCallsClient creates a new instance of UnsafeFunctionCallsClient. +func (c *ClientFactory) NewUnsafeFunctionCallsClient() *UnsafeFunctionCallsClient { + return &UnsafeFunctionCallsClient{ + subscriptionID: c.subscriptionID, + internal: c.internal, + } +} + // NewUsageMetricsClient creates a new instance of UsageMetricsClient. func (c *ClientFactory) NewUsageMetricsClient() *UsageMetricsClient { return &UsageMetricsClient{ diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/constants.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/constants.go index e02d522f7086..35f4ed346615 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/constants.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/constants.go @@ -5,7 +5,7 @@ package armiotfirmwaredefense const ( - version20250802 string = "2025-08-02" + version20260601Preview string = "2026-06-01-preview" ) // ActionType - Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. @@ -145,6 +145,38 @@ func PossibleExecutableClassValues() []ExecutableClass { } } +// ExploitMaturityLevel - String to indicate the exploit maturity of a CVE for the given CVSS score. +type ExploitMaturityLevel string + +const ( + // ExploitMaturityLevelAttacked - Based on available threat intelligence either of the following must apply: attacks targeting + // this vulnerability (attempted or successful) have been reported, or solutions to simplify attempts to exploit the vulnerability + // are publicly or privately available. + ExploitMaturityLevelAttacked ExploitMaturityLevel = "ATTACKED" + // ExploitMaturityLevelNotDefined - Reliable threat intelligence is not available to determine Exploit Maturity characteristics. + // This is the default value and is equivalent to Attacked (A) for the purposes of the calculation of the score by assuming + // the worst case. + ExploitMaturityLevelNotDefined ExploitMaturityLevel = "NOT_DEFINED" + // ExploitMaturityLevelProofOfConcept - Based on available threat intelligence each of the following must apply: proof-of-concept + // exploit code is publicly available, no knowledge of reported attempts to exploit this vulnerability, and no knowledge of + // publicly available solutions used to simplify attempts to exploit the vulnerability + ExploitMaturityLevelProofOfConcept ExploitMaturityLevel = "PROOF_OF_CONCEPT" + // ExploitMaturityLevelUnreported - Based on available threat intelligence each of the following must apply: no knowledge + // of publicly available proof-of-concept exploit code, no knowledge of reported attempts to exploit this vulnerability, and + // no knowledge of publicly available solutions used to simplify attempts to exploit the vulnerability. + ExploitMaturityLevelUnreported ExploitMaturityLevel = "UNREPORTED" +) + +// PossibleExploitMaturityLevelValues returns the possible values for the ExploitMaturityLevel const type. +func PossibleExploitMaturityLevelValues() []ExploitMaturityLevel { + return []ExploitMaturityLevel{ + ExploitMaturityLevelAttacked, + ExploitMaturityLevelNotDefined, + ExploitMaturityLevelProofOfConcept, + ExploitMaturityLevelUnreported, + } +} + // Origin - The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default // value is "user,system" type Origin string @@ -197,6 +229,24 @@ func PossibleProvisioningStateValues() []ProvisioningState { } } +// RansomwareCampaignUse - String to indicate if a vulnerability is known to have been leveraged as part of a ransomware campaign. +type RansomwareCampaignUse string + +const ( + // RansomwareCampaignUseKnown - CISA knows the vulnerability to have been leveraged in a ransomware campaign. + RansomwareCampaignUseKnown RansomwareCampaignUse = "Known" + // RansomwareCampaignUseUnknown - CISA lacks confirmation the vulnerability has been utilized for ransomware. + RansomwareCampaignUseUnknown RansomwareCampaignUse = "Unknown" +) + +// PossibleRansomwareCampaignUseValues returns the possible values for the RansomwareCampaignUse const type. +func PossibleRansomwareCampaignUseValues() []RansomwareCampaignUse { + return []RansomwareCampaignUse{ + RansomwareCampaignUseKnown, + RansomwareCampaignUseUnknown, + } +} + // SKUTier - This field is required to be implemented by the Resource Provider if the service has more than one tier, but // is not required on a PUT. type SKUTier string @@ -255,15 +305,23 @@ type SummaryType string const ( // SummaryTypeBinaryHardening - The summary contains information about the binary hardening analysis results SummaryTypeBinaryHardening SummaryType = "BinaryHardening" - // SummaryTypeCommonVulnerabilitiesAndExposures - The summary contains information about the Common Vulnerabilities and Exposures - // analysis results + // SummaryTypeCommonVulnerabilitiesAndExposures - The summary contains information about the CVE (Common Vulnerabilities and + // Exposures) analysis results (deprecated) SummaryTypeCommonVulnerabilitiesAndExposures SummaryType = "CommonVulnerabilitiesAndExposures" // SummaryTypeCryptoCertificate - The summary contains information about the cryptographic certificate analysis results SummaryTypeCryptoCertificate SummaryType = "CryptoCertificate" // SummaryTypeCryptoKey - The summary contains information about the cryptographic key analysis results SummaryTypeCryptoKey SummaryType = "CryptoKey" + // SummaryTypeCve - The summary contains information about the CVE analysis results + SummaryTypeCve SummaryType = "CVE" // SummaryTypeFirmware - The summary contains information about the submitted firmware SummaryTypeFirmware SummaryType = "Firmware" + // SummaryTypePasswordHash - The summary contains information about the password hash analysis results + SummaryTypePasswordHash SummaryType = "PasswordHash" + // SummaryTypeSbom - The summary contains information about the SBOM (Software Bill of Materials) analysis results + SummaryTypeSbom SummaryType = "SBOM" + // SummaryTypeUnsafeFunctionCalls - The summary contains information about the unsafe function call analysis results + SummaryTypeUnsafeFunctionCalls SummaryType = "UnsafeFunctionCalls" ) // PossibleSummaryTypeValues returns the possible values for the SummaryType const type. @@ -273,6 +331,10 @@ func PossibleSummaryTypeValues() []SummaryType { SummaryTypeCommonVulnerabilitiesAndExposures, SummaryTypeCryptoCertificate, SummaryTypeCryptoKey, + SummaryTypeCve, SummaryTypeFirmware, + SummaryTypePasswordHash, + SummaryTypeSbom, + SummaryTypeUnsafeFunctionCalls, } } diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cryptocertificates_client.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cryptocertificates_client.go index 292a7f9bba81..7fb7f7f58bb2 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cryptocertificates_client.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cryptocertificates_client.go @@ -19,7 +19,7 @@ import ( // CryptoCertificatesClient contains the methods for the CryptoCertificates group. // Don't use this type directly, use NewCryptoCertificatesClient() instead. // -// Generated from API version 2025-08-02 +// Generated from API version 2026-06-01-preview type CryptoCertificatesClient struct { internal *arm.Client subscriptionID string @@ -104,7 +104,7 @@ func (client *CryptoCertificatesClient) listByFirmwareCreateRequest(ctx context. } if firstPage { reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") req.Raw().Header["Accept"] = []string{"application/json"} } diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cryptocertificates_client_example_test.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cryptocertificates_client_example_test.go index 4572b73972f3..69b94100e687 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cryptocertificates_client_example_test.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cryptocertificates_client_example_test.go @@ -11,7 +11,7 @@ import ( "log" ) -// Generated from example definition: 2025-08-02/CryptoCertificates_ListByFirmware_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/CryptoCertificates_ListByFirmware_MaximumSet_Gen.json func ExampleCryptoCertificatesClient_NewListByFirmwarePager_cryptoCertificatesListByFirmwareMaximumSetGenGeneratedByMaximumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -98,7 +98,7 @@ func ExampleCryptoCertificatesClient_NewListByFirmwarePager_cryptoCertificatesLi } } -// Generated from example definition: 2025-08-02/CryptoCertificates_ListByFirmware_MinimumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/CryptoCertificates_ListByFirmware_MinimumSet_Gen.json func ExampleCryptoCertificatesClient_NewListByFirmwarePager_cryptoCertificatesListByFirmwareMinimumSetGen() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cryptokeys_client.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cryptokeys_client.go index 45cfc63f4e61..11c2d218cd11 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cryptokeys_client.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cryptokeys_client.go @@ -19,7 +19,7 @@ import ( // CryptoKeysClient contains the methods for the CryptoKeys group. // Don't use this type directly, use NewCryptoKeysClient() instead. // -// Generated from API version 2025-08-02 +// Generated from API version 2026-06-01-preview type CryptoKeysClient struct { internal *arm.Client subscriptionID string @@ -104,7 +104,7 @@ func (client *CryptoKeysClient) listByFirmwareCreateRequest(ctx context.Context, } if firstPage { reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") req.Raw().Header["Accept"] = []string{"application/json"} } diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cryptokeys_client_example_test.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cryptokeys_client_example_test.go index 41420cb150ec..d8da63e42b41 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cryptokeys_client_example_test.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cryptokeys_client_example_test.go @@ -11,7 +11,7 @@ import ( "log" ) -// Generated from example definition: 2025-08-02/CryptoKeys_ListByFirmware_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/CryptoKeys_ListByFirmware_MaximumSet_Gen.json func ExampleCryptoKeysClient_NewListByFirmwarePager_cryptoKeysListByFirmwareMaximumSetGenGeneratedByMaximumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -74,7 +74,7 @@ func ExampleCryptoKeysClient_NewListByFirmwarePager_cryptoKeysListByFirmwareMaxi } } -// Generated from example definition: 2025-08-02/CryptoKeys_ListByFirmware_MinimumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/CryptoKeys_ListByFirmware_MinimumSet_Gen.json func ExampleCryptoKeysClient_NewListByFirmwarePager_cryptoKeysListByFirmwareMinimumSetGen() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cves_client.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cves_client.go index 315552113e90..753d45bf10cb 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cves_client.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cves_client.go @@ -19,7 +19,7 @@ import ( // CvesClient contains the methods for the Cves group. // Don't use this type directly, use NewCvesClient() instead. // -// Generated from API version 2025-08-02 +// Generated from API version 2026-06-01-preview type CvesClient struct { internal *arm.Client subscriptionID string @@ -103,7 +103,7 @@ func (client *CvesClient) listByFirmwareCreateRequest(ctx context.Context, resou } if firstPage { reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") req.Raw().Header["Accept"] = []string{"application/json"} } diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cves_client_example_test.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cves_client_example_test.go index 3fde2819f504..465ee5884d1b 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cves_client_example_test.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/cves_client_example_test.go @@ -11,7 +11,7 @@ import ( "log" ) -// Generated from example definition: 2025-08-02/Cves_ListByFirmware_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Cves_ListByFirmware_MaximumSet_Gen.json func ExampleCvesClient_NewListByFirmwarePager_cvesListByFirmwareMaximumSetGenGeneratedByMaximumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -51,12 +51,21 @@ func ExampleCvesClient_NewListByFirmwarePager_cvesListByFirmwareMaximumSetGenGen // }, // ProvisioningState: to.Ptr(armiotfirmwaredefense.ProvisioningStateSucceeded), // CveName: to.Ptr("CVE-2000-00001"), - // EffectiveCvssScore: to.Ptr[float32](7.4), - // EffectiveCvssVersion: to.Ptr[int32](3), + // EffectiveCvssScore: to.Ptr[float32](7.6), + // EffectiveCvssVersion: to.Ptr[int32](4), + // EffectiveVectorString: to.Ptr("CVSS:4.0/AV:A/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"), + // EffectiveExploitMaturity: to.Ptr(armiotfirmwaredefense.ExploitMaturityLevelProofOfConcept), // CvssScores: []*armiotfirmwaredefense.CvssScore{ // { // Version: to.Ptr[int32](3), // Score: to.Ptr[float32](7.4), + // VectorString: to.Ptr("CVSS:3.0/AV:A/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"), + // }, + // { + // Version: to.Ptr[int32](4), + // Score: to.Ptr[float32](7.6), + // VectorString: to.Ptr("CVSS:4.0/AV:A/AC:L/AT:N/PR:L/UI:N/VC:L/VI:L/VA:L/SC:N/SI:N/SA:N"), + // ExploitMaturity: to.Ptr(armiotfirmwaredefense.ExploitMaturityLevelProofOfConcept), // }, // }, // Component: &armiotfirmwaredefense.CveComponent{ @@ -69,6 +78,27 @@ func ExampleCvesClient_NewListByFirmwarePager_cvesListByFirmwareMaximumSetGenGen // CvssV3Score: to.Ptr("7.4"), // CvssVersion: to.Ptr("3"), // Description: to.Ptr("This is a sample description of the vulnerability."), + // FixedInVersions: []*string{ + // to.Ptr("1.0.1"), + // to.Ptr("1.0.3"), + // }, + // Epss: &armiotfirmwaredefense.EpssProperties{ + // Score: to.Ptr[float32](0.00206), + // Percentile: to.Ptr[float32](0.3871), + // }, + // Cwes: []*armiotfirmwaredefense.CweProperties{ + // { + // CweID: to.Ptr("CWE-74"), + // CweName: to.Ptr("Improper Neutralization of Special Elements in Output Used by a Downstream Component ('Injection')"), + // Description: to.Ptr("The product constructs all or part of a command using externally-influenced input from an upstream component, but it does not neutralize or incorrectly neutralizes special elements that could modify the intended command when it is sent to a downstream component."), + // }, + // }, + // Kev: &armiotfirmwaredefense.KevProperties{ + // KnownRansomwareCampaignUse: to.Ptr(armiotfirmwaredefense.RansomwareCampaignUseUnknown), + // DateAdded: to.Ptr(time.Date(2025, time.November, 1, 0, 0, 0, 0, time.UTC)), + // RemediationDueDate: to.Ptr(time.Date(2026, time.January, 1, 0, 0, 0, 0, time.UTC)), + // RequiredAction: to.Ptr("If at all possible, use library calls rather than external processes to recreate the desired functionality."), + // }, // }, // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroupName/providers/Microsoft.IoTFirmwareDefense/workspaces/WorkspaceName/firmwares/00000000-0000-0000-0000-000000000000/cves/00000000-0000-0000-0000-000000000000"), // Name: to.Ptr("00000000-0000-0000-0000-000000000000"), @@ -89,7 +119,7 @@ func ExampleCvesClient_NewListByFirmwarePager_cvesListByFirmwareMaximumSetGenGen } } -// Generated from example definition: 2025-08-02/Cves_ListByFirmware_MinimumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Cves_ListByFirmware_MinimumSet_Gen.json func ExampleCvesClient_NewListByFirmwarePager_cvesListByFirmwareMinimumSetGen() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/fake/server_factory.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/fake/server_factory.go index b105c362385c..0b9297d28a11 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/fake/server_factory.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/fake/server_factory.go @@ -42,6 +42,9 @@ type ServerFactory struct { // SummariesServer contains the fakes for client SummariesClient SummariesServer SummariesServer + // UnsafeFunctionCallsServer contains the fakes for client UnsafeFunctionCallsClient + UnsafeFunctionCallsServer UnsafeFunctionCallsServer + // UsageMetricsServer contains the fakes for client UsageMetricsClient UsageMetricsServer UsageMetricsServer @@ -61,19 +64,20 @@ func NewServerFactoryTransport(srv *ServerFactory) *ServerFactoryTransport { // ServerFactoryTransport connects instances of armiotfirmwaredefense.ClientFactory to instances of ServerFactory. // Don't use this type directly, use NewServerFactoryTransport instead. type ServerFactoryTransport struct { - srv *ServerFactory - trMu sync.Mutex - trBinaryHardeningServer *BinaryHardeningServerTransport - trCryptoCertificatesServer *CryptoCertificatesServerTransport - trCryptoKeysServer *CryptoKeysServerTransport - trCvesServer *CvesServerTransport - trFirmwaresServer *FirmwaresServerTransport - trOperationsServer *OperationsServerTransport - trPasswordHashesServer *PasswordHashesServerTransport - trSbomComponentsServer *SbomComponentsServerTransport - trSummariesServer *SummariesServerTransport - trUsageMetricsServer *UsageMetricsServerTransport - trWorkspacesServer *WorkspacesServerTransport + srv *ServerFactory + trMu sync.Mutex + trBinaryHardeningServer *BinaryHardeningServerTransport + trCryptoCertificatesServer *CryptoCertificatesServerTransport + trCryptoKeysServer *CryptoKeysServerTransport + trCvesServer *CvesServerTransport + trFirmwaresServer *FirmwaresServerTransport + trOperationsServer *OperationsServerTransport + trPasswordHashesServer *PasswordHashesServerTransport + trSbomComponentsServer *SbomComponentsServerTransport + trSummariesServer *SummariesServerTransport + trUnsafeFunctionCallsServer *UnsafeFunctionCallsServerTransport + trUsageMetricsServer *UsageMetricsServerTransport + trWorkspacesServer *WorkspacesServerTransport } // Do implements the policy.Transporter interface for ServerFactoryTransport. @@ -124,6 +128,11 @@ func (s *ServerFactoryTransport) Do(req *http.Request) (*http.Response, error) { case "SummariesClient": initServer(&s.trMu, &s.trSummariesServer, func() *SummariesServerTransport { return NewSummariesServerTransport(&s.srv.SummariesServer) }) resp, err = s.trSummariesServer.Do(req) + case "UnsafeFunctionCallsClient": + initServer(&s.trMu, &s.trUnsafeFunctionCallsServer, func() *UnsafeFunctionCallsServerTransport { + return NewUnsafeFunctionCallsServerTransport(&s.srv.UnsafeFunctionCallsServer) + }) + resp, err = s.trUnsafeFunctionCallsServer.Do(req) case "UsageMetricsClient": initServer(&s.trMu, &s.trUsageMetricsServer, func() *UsageMetricsServerTransport { return NewUsageMetricsServerTransport(&s.srv.UsageMetricsServer) }) resp, err = s.trUsageMetricsServer.Do(req) diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/fake/unsafefunctioncalls_server.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/fake/unsafefunctioncalls_server.go new file mode 100644 index 000000000000..4a161feb1e50 --- /dev/null +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/fake/unsafefunctioncalls_server.go @@ -0,0 +1,133 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT. + +package fake + +import ( + "errors" + "fmt" + azfake "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/fake/server" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/to" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/v2" + "net/http" + "net/url" + "regexp" + "slices" +) + +// UnsafeFunctionCallsServer is a fake server for instances of the armiotfirmwaredefense.UnsafeFunctionCallsClient type. +type UnsafeFunctionCallsServer struct { + // NewListByFirmwarePager is the fake for method UnsafeFunctionCallsClient.NewListByFirmwarePager + // HTTP status codes to indicate success: http.StatusOK + NewListByFirmwarePager func(resourceGroupName string, workspaceName string, firmwareID string, options *armiotfirmwaredefense.UnsafeFunctionCallsClientListByFirmwareOptions) (resp azfake.PagerResponder[armiotfirmwaredefense.UnsafeFunctionCallsClientListByFirmwareResponse]) +} + +// NewUnsafeFunctionCallsServerTransport creates a new instance of UnsafeFunctionCallsServerTransport with the provided implementation. +// The returned UnsafeFunctionCallsServerTransport instance is connected to an instance of armiotfirmwaredefense.UnsafeFunctionCallsClient via the +// azcore.ClientOptions.Transporter field in the client's constructor parameters. +func NewUnsafeFunctionCallsServerTransport(srv *UnsafeFunctionCallsServer) *UnsafeFunctionCallsServerTransport { + return &UnsafeFunctionCallsServerTransport{ + srv: srv, + newListByFirmwarePager: newTracker[azfake.PagerResponder[armiotfirmwaredefense.UnsafeFunctionCallsClientListByFirmwareResponse]](), + } +} + +// UnsafeFunctionCallsServerTransport connects instances of armiotfirmwaredefense.UnsafeFunctionCallsClient to instances of UnsafeFunctionCallsServer. +// Don't use this type directly, use NewUnsafeFunctionCallsServerTransport instead. +type UnsafeFunctionCallsServerTransport struct { + srv *UnsafeFunctionCallsServer + newListByFirmwarePager *tracker[azfake.PagerResponder[armiotfirmwaredefense.UnsafeFunctionCallsClientListByFirmwareResponse]] +} + +// Do implements the policy.Transporter interface for UnsafeFunctionCallsServerTransport. +func (u *UnsafeFunctionCallsServerTransport) Do(req *http.Request) (*http.Response, error) { + rawMethod := req.Context().Value(runtime.CtxAPINameKey{}) + method, ok := rawMethod.(string) + if !ok { + return nil, nonRetriableError{errors.New("unable to dispatch request, missing value for CtxAPINameKey")} + } + + return u.dispatchToMethodFake(req, method) +} + +func (u *UnsafeFunctionCallsServerTransport) dispatchToMethodFake(req *http.Request, method string) (*http.Response, error) { + resultChan := make(chan result, 1) + go func() { + var intercepted bool + var res result + if unsafeFunctionCallsServerTransportInterceptor != nil { + res.resp, res.err, intercepted = unsafeFunctionCallsServerTransportInterceptor.Do(req) + } + if !intercepted { + switch method { + case "UnsafeFunctionCallsClient.NewListByFirmwarePager": + res.resp, res.err = u.dispatchNewListByFirmwarePager(req) + default: + res.err = fmt.Errorf("unhandled API %s", method) + } + + } + resultChan <- res + }() + + select { + case <-req.Context().Done(): + return nil, req.Context().Err() + case res := <-resultChan: + return res.resp, res.err + } +} + +func (u *UnsafeFunctionCallsServerTransport) dispatchNewListByFirmwarePager(req *http.Request) (*http.Response, error) { + if u.srv.NewListByFirmwarePager == nil { + return nil, &nonRetriableError{errors.New("fake for method NewListByFirmwarePager not implemented")} + } + newListByFirmwarePager := u.newListByFirmwarePager.get(req) + if newListByFirmwarePager == nil { + const regexStr = `/subscriptions/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/resourceGroups/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/providers/Microsoft\.IoTFirmwareDefense/workspaces/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/firmwares/(?P[!#&$-;=?-\[\]_a-zA-Z0-9~%@]+)/unsafeFunctionCalls` + regex := regexp.MustCompile(regexStr) + matches := regex.FindStringSubmatch(req.URL.EscapedPath()) + if len(matches) < 5 { + return nil, fmt.Errorf("failed to parse path %s", req.URL.Path) + } + resourceGroupNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("resourceGroupName")]) + if err != nil { + return nil, err + } + workspaceNameParam, err := url.PathUnescape(matches[regex.SubexpIndex("workspaceName")]) + if err != nil { + return nil, err + } + firmwareIDParam, err := url.PathUnescape(matches[regex.SubexpIndex("firmwareId")]) + if err != nil { + return nil, err + } + resp := u.srv.NewListByFirmwarePager(resourceGroupNameParam, workspaceNameParam, firmwareIDParam, nil) + newListByFirmwarePager = &resp + u.newListByFirmwarePager.add(req, newListByFirmwarePager) + server.PagerResponderInjectNextLinks(newListByFirmwarePager, req, func(page *armiotfirmwaredefense.UnsafeFunctionCallsClientListByFirmwareResponse, createLink func() string) { + page.NextLink = to.Ptr(createLink()) + }) + } + resp, err := server.PagerResponderNext(newListByFirmwarePager, req) + if err != nil { + return nil, err + } + if !slices.Contains([]int{http.StatusOK}, resp.StatusCode) { + u.newListByFirmwarePager.remove(req) + return nil, &nonRetriableError{fmt.Errorf("unexpected status code %d. acceptable values are http.StatusOK", resp.StatusCode)} + } + if !server.PagerResponderMore(newListByFirmwarePager) { + u.newListByFirmwarePager.remove(req) + } + return resp, nil +} + +// set this to conditionally intercept incoming requests to UnsafeFunctionCallsServerTransport +var unsafeFunctionCallsServerTransportInterceptor interface { + // Do returns true if the server transport should use the returned response/error + Do(*http.Request) (*http.Response, error, bool) +} diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/firmwares_client.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/firmwares_client.go index a74bbd997bd6..a947103c7f1b 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/firmwares_client.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/firmwares_client.go @@ -19,7 +19,7 @@ import ( // FirmwaresClient contains the methods for the Firmwares group. // Don't use this type directly, use NewFirmwaresClient() instead. // -// Generated from API version 2025-08-02 +// Generated from API version 2026-06-01-preview type FirmwaresClient struct { internal *arm.Client subscriptionID string @@ -89,7 +89,7 @@ func (client *FirmwaresClient) createCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -161,7 +161,7 @@ func (client *FirmwaresClient) deleteCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") return req, nil } @@ -213,7 +213,7 @@ func (client *FirmwaresClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -289,7 +289,7 @@ func (client *FirmwaresClient) listByWorkspaceCreateRequest(ctx context.Context, } if firstPage { reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") req.Raw().Header["Accept"] = []string{"application/json"} } @@ -356,7 +356,7 @@ func (client *FirmwaresClient) updateCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/firmwares_client_example_test.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/firmwares_client_example_test.go index 792b9ec93ed3..fd0c7acd545c 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/firmwares_client_example_test.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/firmwares_client_example_test.go @@ -12,7 +12,7 @@ import ( "log" ) -// Generated from example definition: 2025-08-02/Firmwares_Create_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Firmwares_Create_MaximumSet_Gen.json func ExampleFirmwaresClient_Create_firmwaresCreateMaximumSetGenGeneratedByMaximumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -79,7 +79,7 @@ func ExampleFirmwaresClient_Create_firmwaresCreateMaximumSetGenGeneratedByMaximu // } } -// Generated from example definition: 2025-08-02/Firmwares_Create_MinimumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Firmwares_Create_MinimumSet_Gen.json func ExampleFirmwaresClient_Create_firmwaresCreateMinimumSetGen() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -105,7 +105,7 @@ func ExampleFirmwaresClient_Create_firmwaresCreateMinimumSetGen() { // } } -// Generated from example definition: 2025-08-02/Firmwares_Delete_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Firmwares_Delete_MaximumSet_Gen.json func ExampleFirmwaresClient_Delete_firmwaresDeleteMaximumSetGenGeneratedByMaximumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -127,7 +127,7 @@ func ExampleFirmwaresClient_Delete_firmwaresDeleteMaximumSetGenGeneratedByMaximu // } } -// Generated from example definition: 2025-08-02/Firmwares_Delete_MinimumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Firmwares_Delete_MinimumSet_Gen.json func ExampleFirmwaresClient_Delete_firmwaresDeleteMinimumSetGen() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -149,7 +149,7 @@ func ExampleFirmwaresClient_Delete_firmwaresDeleteMinimumSetGen() { // } } -// Generated from example definition: 2025-08-02/Firmwares_Get_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Firmwares_Get_MaximumSet_Gen.json func ExampleFirmwaresClient_Get_firmwaresGetMaximumSetGenGeneratedByMaximumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -200,7 +200,7 @@ func ExampleFirmwaresClient_Get_firmwaresGetMaximumSetGenGeneratedByMaximumSetRu // } } -// Generated from example definition: 2025-08-02/Firmwares_Get_MinimumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Firmwares_Get_MinimumSet_Gen.json func ExampleFirmwaresClient_Get_firmwaresGetMinimumSetGen() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -224,7 +224,7 @@ func ExampleFirmwaresClient_Get_firmwaresGetMinimumSetGen() { // } } -// Generated from example definition: 2025-08-02/Firmwares_ListByWorkspace_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Firmwares_ListByWorkspace_MaximumSet_Gen.json func ExampleFirmwaresClient_NewListByWorkspacePager_firmwaresListByWorkspaceMaximumSetGenGeneratedByMaximumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -285,7 +285,7 @@ func ExampleFirmwaresClient_NewListByWorkspacePager_firmwaresListByWorkspaceMaxi } } -// Generated from example definition: 2025-08-02/Firmwares_ListByWorkspace_MinimumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Firmwares_ListByWorkspace_MinimumSet_Gen.json func ExampleFirmwaresClient_NewListByWorkspacePager_firmwaresListByWorkspaceMinimumSetGen() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -316,7 +316,7 @@ func ExampleFirmwaresClient_NewListByWorkspacePager_firmwaresListByWorkspaceMini } } -// Generated from example definition: 2025-08-02/Firmwares_Update_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Firmwares_Update_MaximumSet_Gen.json func ExampleFirmwaresClient_Update_firmwaresUpdateMaximumSetGenGeneratedByMaximumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -383,7 +383,7 @@ func ExampleFirmwaresClient_Update_firmwaresUpdateMaximumSetGenGeneratedByMaximu // } } -// Generated from example definition: 2025-08-02/Firmwares_Update_MinimumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Firmwares_Update_MinimumSet_Gen.json func ExampleFirmwaresClient_Update_firmwaresUpdateMinimumSetGen() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/interfaces.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/interfaces.go index c0ed04edffbf..6a5acf4ce77d 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/interfaces.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/interfaces.go @@ -7,8 +7,8 @@ package armiotfirmwaredefense // SummaryResourcePropertiesClassification provides polymorphic access to related types. // Call the interface's GetSummaryResourceProperties() method to access the common type. // Use a type switch to determine the concrete type. The possible types are: -// - *BinaryHardeningSummaryResource, *CryptoCertificateSummaryResource, *CryptoKeySummaryResource, *CveSummary, *FirmwareSummary, -// - *SummaryResourceProperties +// - *BinaryHardeningSummaryResource, *CryptoCertificateSummaryResource, *CryptoKeySummaryResource, *CveSummary, *CveSummaryResource, +// - *FirmwareSummary, *PasswordHashSummaryResource, *SbomSummaryResource, *SummaryResourceProperties, *UnsafeFunctionCallsSummaryResource type SummaryResourcePropertiesClassification interface { // GetSummaryResourceProperties returns the SummaryResourceProperties content of the underlying type. GetSummaryResourceProperties() *SummaryResourceProperties diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/models.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/models.go index 77ceb5d7598e..5764b176da66 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/models.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/models.go @@ -420,21 +420,24 @@ type CveResult struct { // Name of the CVE. CveName *string - // Legacy property for the effective CVE score. + // Legacy property for the effective CVE score (deprecated). CvssScore *string // All known CVSS scores for the CVE. CvssScores []*CvssScore - // Legacy property for the CVE CVSS version 2 score, if one existed. + // Legacy property for the CVE CVSS version 2 score, if one existed. (deprecated) CvssV2Score *string - // Legacy property for the CVE CVSS version 3 score, if one existed. + // Legacy property for the CVE CVSS version 3 score, if one existed. (deprecated) CvssV3Score *string - // Legacy property for the what CVSS version score was stored in the cvssScore property + // Legacy property for the what CVSS version score was stored in the cvssScore property (deprecated). CvssVersion *string + // CWE (Common Weakness Enumeration) information related to this CVE. + Cwes []*CweProperties + // The CVE description. Description *string @@ -444,6 +447,21 @@ type CveResult struct { // The version of the effectiveCvssScore property. EffectiveCvssVersion *int32 + // The CVSS exploit maturity value for the effectiveCvssVersion. + EffectiveExploitMaturity *ExploitMaturityLevel + + // The CVSS vector string for the effectiveCvssVersion. + EffectiveVectorString *string + + // EPSS (Exploit Prediction Scoring System) information related to this CVE. + Epss *EpssProperties + + // The component versions in which this weakness was fixed, if any. + FixedInVersions []*string + + // KEV (Known Exploited Vulnerabilities) information related to this CVE. + Kev *KevProperties + // Severity of the CVE. Severity *string @@ -454,7 +472,7 @@ type CveResult struct { ProvisioningState *ProvisioningState } -// CveSummary - Properties for a CVE analysis summary. +// CveSummary - Properties for a CVE (Common Vulnerabilities and Exposures) analysis summary (deprecated). type CveSummary struct { // REQUIRED; Describes the type of summary object. SummaryType *SummaryType @@ -486,13 +504,79 @@ func (c *CveSummary) GetSummaryResourceProperties() *SummaryResourceProperties { } } +// CveSummaryResource - Properties for a CVE analysis summary. +type CveSummaryResource struct { + // REQUIRED; Describes the type of summary object. + SummaryType *SummaryType + + // The total number of critical severity CVEs detected + CriticalCveCount *int64 + + // The total number of high severity CVEs detected + HighCveCount *int64 + + // The total number of low severity CVEs detected + LowCveCount *int64 + + // The total number of medium severity CVEs detected + MediumCveCount *int64 + + // Schema version of the CVE data for this firmware. + SchemaVersion *string + + // Total number of CVEs found. + TotalCveCount *int64 + + // The total number of unknown severity CVEs detected + UnknownCveCount *int64 + + // READ-ONLY; The status of the last operation. + ProvisioningState *ProvisioningState +} + +// GetSummaryResourceProperties implements the SummaryResourcePropertiesClassification interface for type CveSummaryResource. +func (c *CveSummaryResource) GetSummaryResourceProperties() *SummaryResourceProperties { + return &SummaryResourceProperties{ + ProvisioningState: c.ProvisioningState, + SummaryType: c.SummaryType, + } +} + // CvssScore - Common Vulnerability Scoring System values. type CvssScore struct { // REQUIRED; The version of the Common Vulnerability Scoring System (CVSS). Version *int32 + // The likelihood of the vulnerability being attacked based on information regarding the availability of exploitation code/processes + // and the state of exploitation techniques. + ExploitMaturity *ExploitMaturityLevel + // The score of the CVE according to the CVSS specified. Score *float32 + + // The CVSS vector for the specified score + VectorString *string +} + +// CweProperties - CWE (Common Weakness Enumeration) data related to a CVE. +type CweProperties struct { + // The id of the CWE. + CweID *string + + // The name of the CWE. + CweName *string + + // The description of the CWE. + Description *string +} + +// EpssProperties - EPSS (Exploit Prediction Scoring System) data related to a CVE. +type EpssProperties struct { + // The rank ordering of probabilities from high to low. + Percentile *float32 + + // The probability of observing exploitation activity in the next 30 days. + Score *float32 } // Firmware definition @@ -596,12 +680,36 @@ type FirmwareUpdateDefinition struct { Properties *FirmwareProperties } +// FunctionCall - Function call count for a specific function. +type FunctionCall struct { + // REQUIRED; The number of calls to this function within a single binary. + Count *int64 + + // REQUIRED; The name of the function. + FunctionName *string +} + // GenerateUploadURLRequest - Properties for generating an upload URL type GenerateUploadURLRequest struct { // A unique ID for the firmware to be uploaded. FirmwareID *string } +// KevProperties - KEV (Known Exploited Vulnerabilities) data related to a CVE, published by CISA. +type KevProperties struct { + // The date the vulnerability was added to the KEV catalog. + DateAdded *time.Time + + // Indication if the vulnerability is known to have been leveraged as part of a ransomware campaign. + KnownRansomwareCampaignUse *RansomwareCampaignUse + + // The date the required action is due. + RemediationDueDate *time.Time + + // The required action to address the vulnerability. + RequiredAction *string +} + // Operation - REST API Operation // // Details of a REST API operation, returned from the Resource Provider Operations API @@ -716,6 +824,26 @@ type PasswordHashResourceListResult struct { NextLink *string } +// PasswordHashSummaryResource - Properties for Password hash analysis summary. +type PasswordHashSummaryResource struct { + // REQUIRED; Describes the type of summary object. + SummaryType *SummaryType + + // Total number of password hashes found. + TotalPasswordHashCount *int64 + + // READ-ONLY; The status of the last operation. + ProvisioningState *ProvisioningState +} + +// GetSummaryResourceProperties implements the SummaryResourcePropertiesClassification interface for type PasswordHashSummaryResource. +func (p *PasswordHashSummaryResource) GetSummaryResourceProperties() *SummaryResourceProperties { + return &SummaryResourceProperties{ + ProvisioningState: p.ProvisioningState, + SummaryType: p.SummaryType, + } +} + // SKU - The resource model definition representing SKU type SKU struct { // REQUIRED; The name of the SKU. Ex - P3. It is typically a letter+number code @@ -784,6 +912,26 @@ type SbomComponentResourceListResult struct { NextLink *string } +// SbomSummaryResource - Properties for SBOM analysis summary. +type SbomSummaryResource struct { + // REQUIRED; Describes the type of summary object. + SummaryType *SummaryType + + // Total number of SBOM components found. + TotalComponentCount *int64 + + // READ-ONLY; The status of the last operation. + ProvisioningState *ProvisioningState +} + +// GetSummaryResourceProperties implements the SummaryResourcePropertiesClassification interface for type SbomSummaryResource. +func (s *SbomSummaryResource) GetSummaryResourceProperties() *SummaryResourceProperties { + return &SummaryResourceProperties{ + ProvisioningState: s.ProvisioningState, + SummaryType: s.SummaryType, + } +} + // StatusMessage - Error and status message type StatusMessage struct { // The error code @@ -861,6 +1009,83 @@ type URLToken struct { URL *string } +// UnsafeFunctionCallsResource - The object representing a firmware analysis unsafe function calls result resource. +type UnsafeFunctionCallsResource struct { + // The resource-specific properties for this resource. + Properties *UnsafeFunctionCallsResult + + // READ-ONLY; Fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} + ID *string + + // READ-ONLY; The name of the resource + Name *string + + // READ-ONLY; Azure Resource Manager metadata containing createdBy and modifiedBy information. + SystemData *SystemData + + // READ-ONLY; The type of the resource. E.g. "Microsoft.Compute/virtualMachines" or "Microsoft.Storage/storageAccounts" + Type *string +} + +// UnsafeFunctionCallsResourceListResult - The response of a UnsafeFunctionCallsResource list operation. +type UnsafeFunctionCallsResourceListResult struct { + // REQUIRED; The UnsafeFunctionCallsResource items on this page + Value []*UnsafeFunctionCallsResource + + // The link to the next page of items + NextLink *string +} + +// UnsafeFunctionCallsResult - Unsafe function call analysis results for a binary. +type UnsafeFunctionCallsResult struct { + // The name of the binary in the firmware. + FileName *string + + // The full path to the binary in the firmware. + FilePath *string + + // Total number of network-related function calls in the binary. + TotalNetworkCallCount *int64 + + // Total unsafe function call count in the binary. + TotalUnsafeCallCount *int64 + + // List of unsafe function calls and their counts in the binary. + UnsafeFunctionCalls []*FunctionCall + + // READ-ONLY; The status of the last operation. + ProvisioningState *ProvisioningState +} + +// UnsafeFunctionCallsSummaryResource - Properties for unsafe function calls analysis summary. +type UnsafeFunctionCallsSummaryResource struct { + // REQUIRED; Describes the type of summary object. + SummaryType *SummaryType + + // Total number of files analyzed for unsafe function calls. + TotalFileCount *int64 + + // Total number of network calls found. + TotalNetworkCallCount *int64 + + // Total number of unsafe function calls found. + TotalUnsafeCallCount *int64 + + // Total unsafe function call counts per function across all binaries. + UnsafeCallTotals []*FunctionCall + + // READ-ONLY; The status of the last operation. + ProvisioningState *ProvisioningState +} + +// GetSummaryResourceProperties implements the SummaryResourcePropertiesClassification interface for type UnsafeFunctionCallsSummaryResource. +func (u *UnsafeFunctionCallsSummaryResource) GetSummaryResourceProperties() *SummaryResourceProperties { + return &SummaryResourceProperties{ + ProvisioningState: u.ProvisioningState, + SummaryType: u.SummaryType, + } +} + // UsageMetric - The object representing how many firmwares the user has uploaded to the workspace. type UsageMetric struct { // The resource-specific properties for this resource. diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/models_serde.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/models_serde.go index a173988d3269..74c211abe9a1 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/models_serde.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/models_serde.go @@ -861,9 +861,15 @@ func (c CveResult) MarshalJSON() ([]byte, error) { populate(objectMap, "cvssV2Score", c.CvssV2Score) populate(objectMap, "cvssV3Score", c.CvssV3Score) populate(objectMap, "cvssVersion", c.CvssVersion) + populate(objectMap, "cwes", c.Cwes) populate(objectMap, "description", c.Description) populate(objectMap, "effectiveCvssScore", c.EffectiveCvssScore) populate(objectMap, "effectiveCvssVersion", c.EffectiveCvssVersion) + populate(objectMap, "effectiveExploitMaturity", c.EffectiveExploitMaturity) + populate(objectMap, "effectiveVectorString", c.EffectiveVectorString) + populate(objectMap, "epss", c.Epss) + populate(objectMap, "fixedInVersions", c.FixedInVersions) + populate(objectMap, "kev", c.Kev) populate(objectMap, "links", c.Links) populate(objectMap, "provisioningState", c.ProvisioningState) populate(objectMap, "severity", c.Severity) @@ -912,6 +918,9 @@ func (c *CveResult) UnmarshalJSON(data []byte) error { case "cvssVersion": err = unpopulate(val, "CvssVersion", &c.CvssVersion) delete(rawMsg, key) + case "cwes": + err = unpopulate(val, "Cwes", &c.Cwes) + delete(rawMsg, key) case "description": err = unpopulate(val, "Description", &c.Description) delete(rawMsg, key) @@ -921,6 +930,21 @@ func (c *CveResult) UnmarshalJSON(data []byte) error { case "effectiveCvssVersion": err = unpopulate(val, "EffectiveCvssVersion", &c.EffectiveCvssVersion) delete(rawMsg, key) + case "effectiveExploitMaturity": + err = unpopulate(val, "EffectiveExploitMaturity", &c.EffectiveExploitMaturity) + delete(rawMsg, key) + case "effectiveVectorString": + err = unpopulate(val, "EffectiveVectorString", &c.EffectiveVectorString) + delete(rawMsg, key) + case "epss": + err = unpopulate(val, "Epss", &c.Epss) + delete(rawMsg, key) + case "fixedInVersions": + err = unpopulate(val, "FixedInVersions", &c.FixedInVersions) + delete(rawMsg, key) + case "kev": + err = unpopulate(val, "Kev", &c.Kev) + delete(rawMsg, key) case "links": err = unpopulate(val, "Links", &c.Links) delete(rawMsg, key) @@ -989,10 +1013,71 @@ func (c *CveSummary) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type CveSummaryResource. +func (c CveSummaryResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "criticalCveCount", c.CriticalCveCount) + populate(objectMap, "highCveCount", c.HighCveCount) + populate(objectMap, "lowCveCount", c.LowCveCount) + populate(objectMap, "mediumCveCount", c.MediumCveCount) + populate(objectMap, "provisioningState", c.ProvisioningState) + populate(objectMap, "schemaVersion", c.SchemaVersion) + objectMap["summaryType"] = SummaryTypeCve + populate(objectMap, "totalCveCount", c.TotalCveCount) + populate(objectMap, "unknownCveCount", c.UnknownCveCount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CveSummaryResource. +func (c *CveSummaryResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %s", c, err.Error()) + } + for key, val := range rawMsg { + var err error + switch key { + case "criticalCveCount": + err = unpopulate(val, "CriticalCveCount", &c.CriticalCveCount) + delete(rawMsg, key) + case "highCveCount": + err = unpopulate(val, "HighCveCount", &c.HighCveCount) + delete(rawMsg, key) + case "lowCveCount": + err = unpopulate(val, "LowCveCount", &c.LowCveCount) + delete(rawMsg, key) + case "mediumCveCount": + err = unpopulate(val, "MediumCveCount", &c.MediumCveCount) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &c.ProvisioningState) + delete(rawMsg, key) + case "schemaVersion": + err = unpopulate(val, "SchemaVersion", &c.SchemaVersion) + delete(rawMsg, key) + case "summaryType": + err = unpopulate(val, "SummaryType", &c.SummaryType) + delete(rawMsg, key) + case "totalCveCount": + err = unpopulate(val, "TotalCveCount", &c.TotalCveCount) + delete(rawMsg, key) + case "unknownCveCount": + err = unpopulate(val, "UnknownCveCount", &c.UnknownCveCount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %s", c, err.Error()) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type CvssScore. func (c CvssScore) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) + populate(objectMap, "exploitMaturity", c.ExploitMaturity) populate(objectMap, "score", c.Score) + populate(objectMap, "vectorString", c.VectorString) populate(objectMap, "version", c.Version) return json.Marshal(objectMap) } @@ -1006,9 +1091,15 @@ func (c *CvssScore) UnmarshalJSON(data []byte) error { for key, val := range rawMsg { var err error switch key { + case "exploitMaturity": + err = unpopulate(val, "ExploitMaturity", &c.ExploitMaturity) + delete(rawMsg, key) case "score": err = unpopulate(val, "Score", &c.Score) delete(rawMsg, key) + case "vectorString": + err = unpopulate(val, "VectorString", &c.VectorString) + delete(rawMsg, key) case "version": err = unpopulate(val, "Version", &c.Version) delete(rawMsg, key) @@ -1020,6 +1111,72 @@ func (c *CvssScore) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type CweProperties. +func (c CweProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "cweId", c.CweID) + populate(objectMap, "cweName", c.CweName) + populate(objectMap, "description", c.Description) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type CweProperties. +func (c *CweProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %s", c, err.Error()) + } + for key, val := range rawMsg { + var err error + switch key { + case "cweId": + err = unpopulate(val, "CweID", &c.CweID) + delete(rawMsg, key) + case "cweName": + err = unpopulate(val, "CweName", &c.CweName) + delete(rawMsg, key) + case "description": + err = unpopulate(val, "Description", &c.Description) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %s", c, err.Error()) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type EpssProperties. +func (e EpssProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "percentile", e.Percentile) + populate(objectMap, "score", e.Score) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type EpssProperties. +func (e *EpssProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %s", e, err.Error()) + } + for key, val := range rawMsg { + var err error + switch key { + case "percentile": + err = unpopulate(val, "Percentile", &e.Percentile) + delete(rawMsg, key) + case "score": + err = unpopulate(val, "Score", &e.Score) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %s", e, err.Error()) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type Firmware. func (f Firmware) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1239,6 +1396,37 @@ func (f *FirmwareUpdateDefinition) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type FunctionCall. +func (f FunctionCall) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "count", f.Count) + populate(objectMap, "functionName", f.FunctionName) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type FunctionCall. +func (f *FunctionCall) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %s", f, err.Error()) + } + for key, val := range rawMsg { + var err error + switch key { + case "count": + err = unpopulate(val, "Count", &f.Count) + delete(rawMsg, key) + case "functionName": + err = unpopulate(val, "FunctionName", &f.FunctionName) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %s", f, err.Error()) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type GenerateUploadURLRequest. func (g GenerateUploadURLRequest) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1266,6 +1454,45 @@ func (g *GenerateUploadURLRequest) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type KevProperties. +func (k KevProperties) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populateTime[datetime.RFC3339](objectMap, "dateAdded", k.DateAdded, true) + populate(objectMap, "knownRansomwareCampaignUse", k.KnownRansomwareCampaignUse) + populateTime[datetime.RFC3339](objectMap, "remediationDueDate", k.RemediationDueDate, true) + populate(objectMap, "requiredAction", k.RequiredAction) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type KevProperties. +func (k *KevProperties) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %s", k, err.Error()) + } + for key, val := range rawMsg { + var err error + switch key { + case "dateAdded": + err = unpopulateTime[datetime.RFC3339](val, "DateAdded", &k.DateAdded) + delete(rawMsg, key) + case "knownRansomwareCampaignUse": + err = unpopulate(val, "KnownRansomwareCampaignUse", &k.KnownRansomwareCampaignUse) + delete(rawMsg, key) + case "remediationDueDate": + err = unpopulateTime[datetime.RFC3339](val, "RemediationDueDate", &k.RemediationDueDate) + delete(rawMsg, key) + case "requiredAction": + err = unpopulate(val, "RequiredAction", &k.RequiredAction) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %s", k, err.Error()) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type Operation. func (o Operation) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1539,6 +1766,41 @@ func (p *PasswordHashResourceListResult) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type PasswordHashSummaryResource. +func (p PasswordHashSummaryResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", p.ProvisioningState) + objectMap["summaryType"] = SummaryTypePasswordHash + populate(objectMap, "totalPasswordHashCount", p.TotalPasswordHashCount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type PasswordHashSummaryResource. +func (p *PasswordHashSummaryResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %s", p, err.Error()) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &p.ProvisioningState) + delete(rawMsg, key) + case "summaryType": + err = unpopulate(val, "SummaryType", &p.SummaryType) + delete(rawMsg, key) + case "totalPasswordHashCount": + err = unpopulate(val, "TotalPasswordHashCount", &p.TotalPasswordHashCount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %s", p, err.Error()) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type SKU. func (s SKU) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1703,6 +1965,41 @@ func (s *SbomComponentResourceListResult) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type SbomSummaryResource. +func (s SbomSummaryResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", s.ProvisioningState) + objectMap["summaryType"] = SummaryTypeSbom + populate(objectMap, "totalComponentCount", s.TotalComponentCount) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type SbomSummaryResource. +func (s *SbomSummaryResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %s", s, err.Error()) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &s.ProvisioningState) + delete(rawMsg, key) + case "summaryType": + err = unpopulate(val, "SummaryType", &s.SummaryType) + delete(rawMsg, key) + case "totalComponentCount": + err = unpopulate(val, "TotalComponentCount", &s.TotalComponentCount) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %s", s, err.Error()) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type StatusMessage. func (s StatusMessage) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) @@ -1913,6 +2210,174 @@ func (u *URLToken) UnmarshalJSON(data []byte) error { return nil } +// MarshalJSON implements the json.Marshaller interface for type UnsafeFunctionCallsResource. +func (u UnsafeFunctionCallsResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "id", u.ID) + populate(objectMap, "name", u.Name) + populate(objectMap, "properties", u.Properties) + populate(objectMap, "systemData", u.SystemData) + populate(objectMap, "type", u.Type) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UnsafeFunctionCallsResource. +func (u *UnsafeFunctionCallsResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %s", u, err.Error()) + } + for key, val := range rawMsg { + var err error + switch key { + case "id": + err = unpopulate(val, "ID", &u.ID) + delete(rawMsg, key) + case "name": + err = unpopulate(val, "Name", &u.Name) + delete(rawMsg, key) + case "properties": + err = unpopulate(val, "Properties", &u.Properties) + delete(rawMsg, key) + case "systemData": + err = unpopulate(val, "SystemData", &u.SystemData) + delete(rawMsg, key) + case "type": + err = unpopulate(val, "Type", &u.Type) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %s", u, err.Error()) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UnsafeFunctionCallsResourceListResult. +func (u UnsafeFunctionCallsResourceListResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "nextLink", u.NextLink) + populate(objectMap, "value", u.Value) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UnsafeFunctionCallsResourceListResult. +func (u *UnsafeFunctionCallsResourceListResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %s", u, err.Error()) + } + for key, val := range rawMsg { + var err error + switch key { + case "nextLink": + err = unpopulate(val, "NextLink", &u.NextLink) + delete(rawMsg, key) + case "value": + err = unpopulate(val, "Value", &u.Value) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %s", u, err.Error()) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UnsafeFunctionCallsResult. +func (u UnsafeFunctionCallsResult) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "fileName", u.FileName) + populate(objectMap, "filePath", u.FilePath) + populate(objectMap, "provisioningState", u.ProvisioningState) + populate(objectMap, "totalNetworkCallCount", u.TotalNetworkCallCount) + populate(objectMap, "totalUnsafeCallCount", u.TotalUnsafeCallCount) + populate(objectMap, "unsafeFunctionCalls", u.UnsafeFunctionCalls) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UnsafeFunctionCallsResult. +func (u *UnsafeFunctionCallsResult) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %s", u, err.Error()) + } + for key, val := range rawMsg { + var err error + switch key { + case "fileName": + err = unpopulate(val, "FileName", &u.FileName) + delete(rawMsg, key) + case "filePath": + err = unpopulate(val, "FilePath", &u.FilePath) + delete(rawMsg, key) + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &u.ProvisioningState) + delete(rawMsg, key) + case "totalNetworkCallCount": + err = unpopulate(val, "TotalNetworkCallCount", &u.TotalNetworkCallCount) + delete(rawMsg, key) + case "totalUnsafeCallCount": + err = unpopulate(val, "TotalUnsafeCallCount", &u.TotalUnsafeCallCount) + delete(rawMsg, key) + case "unsafeFunctionCalls": + err = unpopulate(val, "UnsafeFunctionCalls", &u.UnsafeFunctionCalls) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %s", u, err.Error()) + } + } + return nil +} + +// MarshalJSON implements the json.Marshaller interface for type UnsafeFunctionCallsSummaryResource. +func (u UnsafeFunctionCallsSummaryResource) MarshalJSON() ([]byte, error) { + objectMap := make(map[string]any) + populate(objectMap, "provisioningState", u.ProvisioningState) + objectMap["summaryType"] = SummaryTypeUnsafeFunctionCalls + populate(objectMap, "totalFileCount", u.TotalFileCount) + populate(objectMap, "totalNetworkCallCount", u.TotalNetworkCallCount) + populate(objectMap, "totalUnsafeCallCount", u.TotalUnsafeCallCount) + populate(objectMap, "unsafeCallTotals", u.UnsafeCallTotals) + return json.Marshal(objectMap) +} + +// UnmarshalJSON implements the json.Unmarshaller interface for type UnsafeFunctionCallsSummaryResource. +func (u *UnsafeFunctionCallsSummaryResource) UnmarshalJSON(data []byte) error { + var rawMsg map[string]json.RawMessage + if err := json.Unmarshal(data, &rawMsg); err != nil { + return fmt.Errorf("unmarshalling type %T: %s", u, err.Error()) + } + for key, val := range rawMsg { + var err error + switch key { + case "provisioningState": + err = unpopulate(val, "ProvisioningState", &u.ProvisioningState) + delete(rawMsg, key) + case "summaryType": + err = unpopulate(val, "SummaryType", &u.SummaryType) + delete(rawMsg, key) + case "totalFileCount": + err = unpopulate(val, "TotalFileCount", &u.TotalFileCount) + delete(rawMsg, key) + case "totalNetworkCallCount": + err = unpopulate(val, "TotalNetworkCallCount", &u.TotalNetworkCallCount) + delete(rawMsg, key) + case "totalUnsafeCallCount": + err = unpopulate(val, "TotalUnsafeCallCount", &u.TotalUnsafeCallCount) + delete(rawMsg, key) + case "unsafeCallTotals": + err = unpopulate(val, "UnsafeCallTotals", &u.UnsafeCallTotals) + delete(rawMsg, key) + } + if err != nil { + return fmt.Errorf("unmarshalling type %T: %s", u, err.Error()) + } + } + return nil +} + // MarshalJSON implements the json.Marshaller interface for type UsageMetric. func (u UsageMetric) MarshalJSON() ([]byte, error) { objectMap := make(map[string]any) diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/operations_client.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/operations_client.go index d95c05a20f7b..5af3b7dc038a 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/operations_client.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/operations_client.go @@ -17,7 +17,7 @@ import ( // OperationsClient contains the methods for the Operations group. // Don't use this type directly, use NewOperationsClient() instead. // -// Generated from API version 2025-08-02 +// Generated from API version 2026-06-01-preview type OperationsClient struct { internal *arm.Client } @@ -79,7 +79,7 @@ func (client *OperationsClient) listCreateRequest(ctx context.Context, nextLink } if firstPage { reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") req.Raw().Header["Accept"] = []string{"application/json"} } diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/operations_client_example_test.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/operations_client_example_test.go index 29ad3c978880..738fdc3382b5 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/operations_client_example_test.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/operations_client_example_test.go @@ -11,7 +11,7 @@ import ( "log" ) -// Generated from example definition: 2025-08-02/Operations_List_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Operations_List_MaximumSet_Gen.json func ExampleOperationsClient_NewListPager_operationsListMaximumSetGenGeneratedByMaximumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -55,7 +55,7 @@ func ExampleOperationsClient_NewListPager_operationsListMaximumSetGenGeneratedBy } } -// Generated from example definition: 2025-08-02/Operations_List_MinimumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Operations_List_MinimumSet_Gen.json func ExampleOperationsClient_NewListPager_operationsListMaximumSetGenGeneratedByMinimumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/options.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/options.go index d466b78d1235..ddda9c372fc6 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/options.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/options.go @@ -80,6 +80,12 @@ type SummariesClientListByFirmwareOptions struct { // placeholder for future optional parameters } +// UnsafeFunctionCallsClientListByFirmwareOptions contains the optional parameters for the UnsafeFunctionCallsClient.NewListByFirmwarePager +// method. +type UnsafeFunctionCallsClientListByFirmwareOptions struct { + // placeholder for future optional parameters +} + // UsageMetricsClientGetOptions contains the optional parameters for the UsageMetricsClient.Get method. type UsageMetricsClientGetOptions struct { // placeholder for future optional parameters diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/passwordhashes_client.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/passwordhashes_client.go index 1f097c8368c3..3be7af71dfe9 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/passwordhashes_client.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/passwordhashes_client.go @@ -19,7 +19,7 @@ import ( // PasswordHashesClient contains the methods for the PasswordHashes group. // Don't use this type directly, use NewPasswordHashesClient() instead. // -// Generated from API version 2025-08-02 +// Generated from API version 2026-06-01-preview type PasswordHashesClient struct { internal *arm.Client subscriptionID string @@ -104,7 +104,7 @@ func (client *PasswordHashesClient) listByFirmwareCreateRequest(ctx context.Cont } if firstPage { reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") req.Raw().Header["Accept"] = []string{"application/json"} } diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/passwordhashes_client_example_test.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/passwordhashes_client_example_test.go index 5585438c023f..6fd0363317aa 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/passwordhashes_client_example_test.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/passwordhashes_client_example_test.go @@ -11,7 +11,7 @@ import ( "log" ) -// Generated from example definition: 2025-08-02/PasswordHashes_ListByFirmware_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/PasswordHashes_ListByFirmware_MaximumSet_Gen.json func ExamplePasswordHashesClient_NewListByFirmwarePager_passwordHashesListByFirmwareMaximumSetGenGeneratedByMaximumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -66,7 +66,7 @@ func ExamplePasswordHashesClient_NewListByFirmwarePager_passwordHashesListByFirm } } -// Generated from example definition: 2025-08-02/PasswordHashes_ListByFirmware_MinimumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/PasswordHashes_ListByFirmware_MinimumSet_Gen.json func ExamplePasswordHashesClient_NewListByFirmwarePager_passwordHashesListByFirmwareMinimumSetGen() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/polymorphic_helpers.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/polymorphic_helpers.go index 0afb25c0231a..202d7c4c589b 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/polymorphic_helpers.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/polymorphic_helpers.go @@ -24,8 +24,16 @@ func unmarshalSummaryResourcePropertiesClassification(rawMsg json.RawMessage) (S b = &CryptoCertificateSummaryResource{} case string(SummaryTypeCryptoKey): b = &CryptoKeySummaryResource{} + case string(SummaryTypeCve): + b = &CveSummaryResource{} case string(SummaryTypeFirmware): b = &FirmwareSummary{} + case string(SummaryTypePasswordHash): + b = &PasswordHashSummaryResource{} + case string(SummaryTypeSbom): + b = &SbomSummaryResource{} + case string(SummaryTypeUnsafeFunctionCalls): + b = &UnsafeFunctionCallsSummaryResource{} default: b = &SummaryResourceProperties{} } diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/responses.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/responses.go index 9d069ef98a6f..d211be6d5b79 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/responses.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/responses.go @@ -87,6 +87,12 @@ type SummariesClientListByFirmwareResponse struct { SummaryResourceListResult } +// UnsafeFunctionCallsClientListByFirmwareResponse contains the response from method UnsafeFunctionCallsClient.NewListByFirmwarePager. +type UnsafeFunctionCallsClientListByFirmwareResponse struct { + // The response of a UnsafeFunctionCallsResource list operation. + UnsafeFunctionCallsResourceListResult +} + // UsageMetricsClientGetResponse contains the response from method UsageMetricsClient.Get. type UsageMetricsClientGetResponse struct { // The object representing how many firmwares the user has uploaded to the workspace. diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/sbomcomponents_client.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/sbomcomponents_client.go index 39f98308a6d7..20df751e16e9 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/sbomcomponents_client.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/sbomcomponents_client.go @@ -19,7 +19,7 @@ import ( // SbomComponentsClient contains the methods for the SbomComponents group. // Don't use this type directly, use NewSbomComponentsClient() instead. // -// Generated from API version 2025-08-02 +// Generated from API version 2026-06-01-preview type SbomComponentsClient struct { internal *arm.Client subscriptionID string @@ -104,7 +104,7 @@ func (client *SbomComponentsClient) listByFirmwareCreateRequest(ctx context.Cont } if firstPage { reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") req.Raw().Header["Accept"] = []string{"application/json"} } diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/sbomcomponents_client_example_test.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/sbomcomponents_client_example_test.go index 22bef81d6ed2..7ecd15dd5f87 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/sbomcomponents_client_example_test.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/sbomcomponents_client_example_test.go @@ -11,7 +11,7 @@ import ( "log" ) -// Generated from example definition: 2025-08-02/SbomComponents_ListByFirmware_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/SbomComponents_ListByFirmware_MaximumSet_Gen.json func ExampleSbomComponentsClient_NewListByFirmwarePager_sbomComponentsListByFirmwareMaximumSetGenGeneratedByMaximumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -66,7 +66,7 @@ func ExampleSbomComponentsClient_NewListByFirmwarePager_sbomComponentsListByFirm } } -// Generated from example definition: 2025-08-02/SbomComponents_ListByFirmware_MinimumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/SbomComponents_ListByFirmware_MinimumSet_Gen.json func ExampleSbomComponentsClient_NewListByFirmwarePager_sbomComponentsListByFirmwareMinimumSetGen() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/summaries_client.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/summaries_client.go index 7fe07f82d580..b2ad7e62aae4 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/summaries_client.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/summaries_client.go @@ -19,7 +19,7 @@ import ( // SummariesClient contains the methods for the Summaries group. // Don't use this type directly, use NewSummariesClient() instead. // -// Generated from API version 2025-08-02 +// Generated from API version 2026-06-01-preview type SummariesClient struct { internal *arm.Client subscriptionID string @@ -93,7 +93,7 @@ func (client *SummariesClient) getCreateRequest(ctx context.Context, resourceGro return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -175,7 +175,7 @@ func (client *SummariesClient) listByFirmwareCreateRequest(ctx context.Context, } if firstPage { reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") req.Raw().Header["Accept"] = []string{"application/json"} } diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/summaries_client_example_test.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/summaries_client_example_test.go index ac9cb39bd674..ccb96d557379 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/summaries_client_example_test.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/summaries_client_example_test.go @@ -11,7 +11,7 @@ import ( "log" ) -// Generated from example definition: 2025-08-02/Summaries_Get_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Summaries_Get_MaximumSet_Gen.json func ExampleSummariesClient_Get_summariesGetMaximumSetGenGeneratedByMaximumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -50,7 +50,7 @@ func ExampleSummariesClient_Get_summariesGetMaximumSetGenGeneratedByMaximumSetRu // } } -// Generated from example definition: 2025-08-02/Summaries_Get_MinimumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Summaries_Get_MinimumSet_Gen.json func ExampleSummariesClient_Get_summariesGetMinimumSetGen() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -74,7 +74,7 @@ func ExampleSummariesClient_Get_summariesGetMinimumSetGen() { // } } -// Generated from example definition: 2025-08-02/Summaries_ListByFirmware_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Summaries_ListByFirmware_MaximumSet_Gen.json func ExampleSummariesClient_NewListByFirmwarePager_summariesListByFirmwareMaximumSetGenGeneratedByMaximumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -123,7 +123,7 @@ func ExampleSummariesClient_NewListByFirmwarePager_summariesListByFirmwareMaximu } } -// Generated from example definition: 2025-08-02/Summaries_ListByFirmware_MinimumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Summaries_ListByFirmware_MinimumSet_Gen.json func ExampleSummariesClient_NewListByFirmwarePager_summariesListByFirmwareMinimumSetGen() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/testdata/_metadata.json b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/testdata/_metadata.json index 7ce2db64ac9b..a40d55138137 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/testdata/_metadata.json +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/testdata/_metadata.json @@ -1,6 +1,6 @@ { "apiVersions": { - "Microsoft.IoTFirmwareDefense": "2025-08-02" + "Microsoft.IoTFirmwareDefense": "2026-06-01-preview" }, "emitterVersion": "0.16.0" } diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/tsp-location.yaml b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/tsp-location.yaml index 360bd5f812f4..1ea7aef0631e 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/tsp-location.yaml +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/tsp-location.yaml @@ -1,4 +1,4 @@ -directory: specification/fist/IotFirmwareDefense.Management -commit: 217f332d35760fbe2034475504284f5d84bdd968 +directory: specification/fist/resource-manager/Microsoft.IoTFirmwareDefense/IoTFirmwareDefense +commit: 4362bdee9aba8de72a82c14063e3bd5f3e55c3bf repo: Azure/azure-rest-api-specs additionalDirectories: diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/unsafefunctioncalls_client.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/unsafefunctioncalls_client.go new file mode 100644 index 000000000000..c4785be5b861 --- /dev/null +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/unsafefunctioncalls_client.go @@ -0,0 +1,124 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT. + +package armiotfirmwaredefense + +import ( + "context" + "errors" + "github.com/Azure/azure-sdk-for-go/sdk/azcore" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/arm" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/policy" + "github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime" + "net/http" + "net/url" + "strings" +) + +// UnsafeFunctionCallsClient contains the methods for the UnsafeFunctionCalls group. +// Don't use this type directly, use NewUnsafeFunctionCallsClient() instead. +// +// Generated from API version 2026-06-01-preview +type UnsafeFunctionCallsClient struct { + internal *arm.Client + subscriptionID string +} + +// NewUnsafeFunctionCallsClient creates a new instance of UnsafeFunctionCallsClient with the specified values. +// - subscriptionID - The ID of the target subscription. The value must be an UUID. +// - credential - used to authorize requests. Usually a credential from azidentity. +// - options - Contains optional client configuration. Pass nil to accept the default values. +func NewUnsafeFunctionCallsClient(subscriptionID string, credential azcore.TokenCredential, options *arm.ClientOptions) (*UnsafeFunctionCallsClient, error) { + cl, err := arm.NewClient(moduleName, moduleVersion, credential, options) + if err != nil { + return nil, err + } + client := &UnsafeFunctionCallsClient{ + subscriptionID: subscriptionID, + internal: cl, + } + return client, nil +} + +// NewListByFirmwarePager - Lists unsafe function call analysis results of a firmware. +// - resourceGroupName - The name of the resource group. The name is case insensitive. +// - workspaceName - The name of the firmware analysis workspace. +// - firmwareID - The id of the firmware. +// - options - UnsafeFunctionCallsClientListByFirmwareOptions contains the optional parameters for the UnsafeFunctionCallsClient.NewListByFirmwarePager +// method. +func (client *UnsafeFunctionCallsClient) NewListByFirmwarePager(resourceGroupName string, workspaceName string, firmwareID string, options *UnsafeFunctionCallsClientListByFirmwareOptions) *runtime.Pager[UnsafeFunctionCallsClientListByFirmwareResponse] { + return runtime.NewPager(runtime.PagingHandler[UnsafeFunctionCallsClientListByFirmwareResponse]{ + More: func(page UnsafeFunctionCallsClientListByFirmwareResponse) bool { + return page.NextLink != nil && len(*page.NextLink) > 0 + }, + Fetcher: func(ctx context.Context, page *UnsafeFunctionCallsClientListByFirmwareResponse) (UnsafeFunctionCallsClientListByFirmwareResponse, error) { + ctx = context.WithValue(ctx, runtime.CtxAPINameKey{}, "UnsafeFunctionCallsClient.NewListByFirmwarePager") + nextLink := "" + if page != nil { + nextLink = *page.NextLink + } + req, err := client.listByFirmwareCreateRequest(ctx, resourceGroupName, workspaceName, firmwareID, nextLink, options) + if err != nil { + return UnsafeFunctionCallsClientListByFirmwareResponse{}, err + } + resp, err := client.internal.Pipeline().Do(req) + if err != nil { + return UnsafeFunctionCallsClientListByFirmwareResponse{}, err + } + return client.listByFirmwareHandleResponse(resp, http.StatusOK) + }, + Tracer: client.internal.Tracer(), + }) +} + +// listByFirmwareCreateRequest creates the ListByFirmware request. +func (client *UnsafeFunctionCallsClient) listByFirmwareCreateRequest(ctx context.Context, resourceGroupName string, workspaceName string, firmwareID string, nextLink string, _ *UnsafeFunctionCallsClientListByFirmwareOptions) (*policy.Request, error) { + firstPage := nextLink == "" + var req *policy.Request + var err error + if firstPage { + urlPath := "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.IoTFirmwareDefense/workspaces/{workspaceName}/firmwares/{firmwareId}/unsafeFunctionCalls" + if client.subscriptionID == "" { + return nil, errors.New("parameter client.subscriptionID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{subscriptionId}", url.PathEscape(client.subscriptionID)) + if resourceGroupName == "" { + return nil, errors.New("parameter resourceGroupName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{resourceGroupName}", url.PathEscape(resourceGroupName)) + if workspaceName == "" { + return nil, errors.New("parameter workspaceName cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{workspaceName}", url.PathEscape(workspaceName)) + if firmwareID == "" { + return nil, errors.New("parameter firmwareID cannot be empty") + } + urlPath = strings.ReplaceAll(urlPath, "{firmwareId}", url.PathEscape(firmwareID)) + req, err = runtime.NewRequest(ctx, http.MethodGet, runtime.JoinPaths(client.internal.Endpoint(), urlPath)) + } else { + req, err = runtime.NewRequestForNextLink(ctx, http.MethodGet, client.internal.Endpoint(), nextLink) + } + if err != nil { + return nil, err + } + if firstPage { + reqQP := req.Raw().URL.Query() + reqQP.Set("api-version", version20260601Preview) + req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") + req.Raw().Header["Accept"] = []string{"application/json"} + } + return req, nil +} + +// listByFirmwareHandleResponse handles the ListByFirmware response. +func (client *UnsafeFunctionCallsClient) listByFirmwareHandleResponse(resp *http.Response, successCodes ...int) (UnsafeFunctionCallsClientListByFirmwareResponse, error) { + result := UnsafeFunctionCallsClientListByFirmwareResponse{} + if !runtime.HasStatusCode(resp, successCodes...) { + return result, runtime.NewResponseError(resp) + } + if err := runtime.UnmarshalAsJSON(resp, &result.UnsafeFunctionCallsResourceListResult); err != nil { + return UnsafeFunctionCallsClientListByFirmwareResponse{}, err + } + return result, nil +} diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/unsafefunctioncalls_client_example_test.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/unsafefunctioncalls_client_example_test.go new file mode 100644 index 000000000000..399230efe4ce --- /dev/null +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/unsafefunctioncalls_client_example_test.go @@ -0,0 +1,128 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. See License.txt in the project root for license information. +// Code generated by Microsoft (R) Go Code Generator. DO NOT EDIT. + +package armiotfirmwaredefense_test + +import ( + "context" + "github.com/Azure/azure-sdk-for-go/sdk/azidentity" + "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/v2" + "log" +) + +// Generated from example definition: 2026-06-01-preview/UnsafeFunctionCalls_ListByFirmware_MaximumSet_Gen.json +func ExampleUnsafeFunctionCallsClient_NewListByFirmwarePager_unsafeFunctionCallsListByFirmwareMaximumSetGenGeneratedByMaximumSetRule() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotfirmwaredefense.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewUnsafeFunctionCallsClient().NewListByFirmwarePager("rgiotfirmwaredefense", "exampleWorkspaceName", "00000000-0000-0000-0000-000000000000", nil) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + log.Fatalf("failed to advance page: %v", err) + } + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. + _ = v + } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page = armiotfirmwaredefense.UnsafeFunctionCallsClientListByFirmwareResponse{ + // UnsafeFunctionCallsResourceListResult: armiotfirmwaredefense.UnsafeFunctionCallsResourceListResult{ + // Value: []*armiotfirmwaredefense.UnsafeFunctionCallsResource{ + // { + // Properties: &armiotfirmwaredefense.UnsafeFunctionCallsResult{ + // FileName: to.Ptr("example_binary"), + // FilePath: to.Ptr("/usr/bin/example_binary"), + // UnsafeFunctionCalls: []*armiotfirmwaredefense.FunctionCall{ + // { + // FunctionName: to.Ptr("strcpy"), + // Count: to.Ptr[int64](5), + // }, + // { + // FunctionName: to.Ptr("strcat"), + // Count: to.Ptr[int64](2), + // }, + // { + // FunctionName: to.Ptr("printf"), + // Count: to.Ptr[int64](4), + // }, + // { + // FunctionName: to.Ptr("fprintf"), + // Count: to.Ptr[int64](1), + // }, + // { + // FunctionName: to.Ptr("sprintf"), + // Count: to.Ptr[int64](1), + // }, + // { + // FunctionName: to.Ptr("system"), + // Count: to.Ptr[int64](1), + // }, + // { + // FunctionName: to.Ptr("mmap"), + // Count: to.Ptr[int64](3), + // }, + // { + // FunctionName: to.Ptr("popen"), + // Count: to.Ptr[int64](0), + // }, + // }, + // TotalUnsafeCallCount: to.Ptr[int64](17), + // TotalNetworkCallCount: to.Ptr[int64](3), + // }, + // ID: to.Ptr("/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroupName/providers/Microsoft.IoTFirmwareDefense/workspaces/WorkspaceName/firmwares/00000000-0000-0000-0000-000000000000/unsafeFunctionCalls/00000000-0000-0000-0000-000000000000"), + // Name: to.Ptr("00000000-0000-0000-0000-000000000000"), + // Type: to.Ptr("Microsoft.IoTFirmwareDefense/workspaces/firmwares/unsafeFunctionCalls"), + // SystemData: &armiotfirmwaredefense.SystemData{ + // CreatedBy: to.Ptr("UserName"), + // CreatedByType: to.Ptr(armiotfirmwaredefense.CreatedByTypeUser), + // CreatedAt: to.Ptr(time.Date(2024, time.June, 13, 15, 22, 45, 940000000, time.UTC)), + // LastModifiedBy: to.Ptr("UserName"), + // LastModifiedByType: to.Ptr(armiotfirmwaredefense.CreatedByTypeUser), + // LastModifiedAt: to.Ptr(time.Date(2024, time.June, 13, 15, 22, 45, 940000000, time.UTC)), + // }, + // }, + // }, + // NextLink: to.Ptr("https://microsoft.com/a"), + // }, + // } + } +} + +// Generated from example definition: 2026-06-01-preview/UnsafeFunctionCalls_ListByFirmware_MinimumSet_Gen.json +func ExampleUnsafeFunctionCallsClient_NewListByFirmwarePager_unsafeFunctionCallsListByFirmwareMinimumSetGen() { + cred, err := azidentity.NewDefaultAzureCredential(nil) + if err != nil { + log.Fatalf("failed to obtain a credential: %v", err) + } + ctx := context.Background() + clientFactory, err := armiotfirmwaredefense.NewClientFactory("00000000-0000-0000-0000-000000000000", cred, nil) + if err != nil { + log.Fatalf("failed to create client: %v", err) + } + pager := clientFactory.NewUnsafeFunctionCallsClient().NewListByFirmwarePager("FirmwareAnalysisRG", "default", "00000000-0000-0000-0000-000000000000", nil) + for pager.More() { + page, err := pager.NextPage(ctx) + if err != nil { + log.Fatalf("failed to advance page: %v", err) + } + for _, v := range page.Value { + // You could use page here. We use blank identifier for just demo purposes. + _ = v + } + // If the HTTP response code is 200 as defined in example definition, your page structure would look as follows. Please pay attention that all the values in the output are fake values for just demo purposes. + // page = armiotfirmwaredefense.UnsafeFunctionCallsClientListByFirmwareResponse{ + // UnsafeFunctionCallsResourceListResult: armiotfirmwaredefense.UnsafeFunctionCallsResourceListResult{ + // Value: []*armiotfirmwaredefense.UnsafeFunctionCallsResource{ + // }, + // }, + // } + } +} diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/usagemetrics_client.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/usagemetrics_client.go index fb60ad0915bb..92d264f0b4e1 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/usagemetrics_client.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/usagemetrics_client.go @@ -19,7 +19,7 @@ import ( // UsageMetricsClient contains the methods for the UsageMetrics group. // Don't use this type directly, use NewUsageMetricsClient() instead. // -// Generated from API version 2025-08-02 +// Generated from API version 2026-06-01-preview type UsageMetricsClient struct { internal *arm.Client subscriptionID string @@ -88,7 +88,7 @@ func (client *UsageMetricsClient) getCreateRequest(ctx context.Context, resource return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -164,7 +164,7 @@ func (client *UsageMetricsClient) listByWorkspaceCreateRequest(ctx context.Conte } if firstPage { reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") req.Raw().Header["Accept"] = []string{"application/json"} } diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/usagemetrics_client_example_test.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/usagemetrics_client_example_test.go index 0fcf1b6a9f7b..593bc0df0c5b 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/usagemetrics_client_example_test.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/usagemetrics_client_example_test.go @@ -11,7 +11,7 @@ import ( "log" ) -// Generated from example definition: 2025-08-02/UsageMetrics_Get_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/UsageMetrics_Get_MaximumSet_Gen.json func ExampleUsageMetricsClient_Get() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -51,7 +51,7 @@ func ExampleUsageMetricsClient_Get() { // } } -// Generated from example definition: 2025-08-02/UsageMetrics_ListByWorkspace_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/UsageMetrics_ListByWorkspace_MaximumSet_Gen.json func ExampleUsageMetricsClient_NewListByWorkspacePager() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/version.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/version.go index 04150335c262..f7aff25760de 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/version.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/version.go @@ -6,5 +6,5 @@ package armiotfirmwaredefense const ( moduleName = "github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense" - moduleVersion = "v2.0.0" + moduleVersion = "v2.1.0-beta.1" ) diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/workspaces_client.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/workspaces_client.go index 085694a174a3..b5ea8f639d05 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/workspaces_client.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/workspaces_client.go @@ -19,7 +19,7 @@ import ( // WorkspacesClient contains the methods for the Workspaces group. // Don't use this type directly, use NewWorkspacesClient() instead. // -// Generated from API version 2025-08-02 +// Generated from API version 2026-06-01-preview type WorkspacesClient struct { internal *arm.Client subscriptionID string @@ -84,7 +84,7 @@ func (client *WorkspacesClient) createCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -170,7 +170,7 @@ func (client *WorkspacesClient) deleteCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") return req, nil } @@ -219,7 +219,7 @@ func (client *WorkspacesClient) generateUploadURLCreateRequest(ctx context.Conte return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} @@ -283,7 +283,7 @@ func (client *WorkspacesClient) getCreateRequest(ctx context.Context, resourceGr return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") req.Raw().Header["Accept"] = []string{"application/json"} return req, nil @@ -354,7 +354,7 @@ func (client *WorkspacesClient) listByResourceGroupCreateRequest(ctx context.Con } if firstPage { reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") req.Raw().Header["Accept"] = []string{"application/json"} } @@ -421,7 +421,7 @@ func (client *WorkspacesClient) listBySubscriptionCreateRequest(ctx context.Cont } if firstPage { reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") req.Raw().Header["Accept"] = []string{"application/json"} } @@ -483,7 +483,7 @@ func (client *WorkspacesClient) updateCreateRequest(ctx context.Context, resourc return nil, err } reqQP := req.Raw().URL.Query() - reqQP.Set("api-version", version20250802) + reqQP.Set("api-version", version20260601Preview) req.Raw().URL.RawQuery = strings.ReplaceAll(reqQP.Encode(), "+", "%20") req.Raw().Header["Accept"] = []string{"application/json"} req.Raw().Header["Content-Type"] = []string{"application/json"} diff --git a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/workspaces_client_example_test.go b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/workspaces_client_example_test.go index 5f206296ee04..a28e96d49ab4 100644 --- a/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/workspaces_client_example_test.go +++ b/sdk/resourcemanager/iotfirmwaredefense/armiotfirmwaredefense/workspaces_client_example_test.go @@ -12,7 +12,7 @@ import ( "log" ) -// Generated from example definition: 2025-08-02/Workspaces_Create_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Workspaces_Create_MaximumSet_Gen.json func ExampleWorkspacesClient_Create_workspacesCreateMaximumSetGenGeneratedByMaximumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -73,7 +73,7 @@ func ExampleWorkspacesClient_Create_workspacesCreateMaximumSetGenGeneratedByMaxi // } } -// Generated from example definition: 2025-08-02/Workspaces_Create_MinimumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Workspaces_Create_MinimumSet_Gen.json func ExampleWorkspacesClient_Create_workspacesCreateMinimumSetGen() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -104,7 +104,7 @@ func ExampleWorkspacesClient_Create_workspacesCreateMinimumSetGen() { // } } -// Generated from example definition: 2025-08-02/Workspaces_Delete_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Workspaces_Delete_MaximumSet_Gen.json func ExampleWorkspacesClient_BeginDelete_workspacesDeleteMaximumSetGenGeneratedByMaximumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -125,7 +125,7 @@ func ExampleWorkspacesClient_BeginDelete_workspacesDeleteMaximumSetGenGeneratedB } } -// Generated from example definition: 2025-08-02/Workspaces_Delete_MinimumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Workspaces_Delete_MinimumSet_Gen.json func ExampleWorkspacesClient_BeginDelete_workspacesDeleteMinimumSetGen() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -146,7 +146,7 @@ func ExampleWorkspacesClient_BeginDelete_workspacesDeleteMinimumSetGen() { } } -// Generated from example definition: 2025-08-02/Workspaces_GenerateUploadUrl_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Workspaces_GenerateUploadUrl_MaximumSet_Gen.json func ExampleWorkspacesClient_GenerateUploadURL_workspacesGenerateUploadUrlMaximumSetGenGeneratedByMaximumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -173,7 +173,7 @@ func ExampleWorkspacesClient_GenerateUploadURL_workspacesGenerateUploadUrlMaximu // } } -// Generated from example definition: 2025-08-02/Workspaces_GenerateUploadUrl_MinimumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Workspaces_GenerateUploadUrl_MinimumSet_Gen.json func ExampleWorkspacesClient_GenerateUploadURL_workspacesGenerateUploadUrlMinimumSetGen() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -199,7 +199,7 @@ func ExampleWorkspacesClient_GenerateUploadURL_workspacesGenerateUploadUrlMinimu // } } -// Generated from example definition: 2025-08-02/Workspaces_Get_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Workspaces_Get_MaximumSet_Gen.json func ExampleWorkspacesClient_Get_workspacesGetMaximumSetGenGeneratedByMaximumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -248,7 +248,7 @@ func ExampleWorkspacesClient_Get_workspacesGetMaximumSetGenGeneratedByMaximumSet // } } -// Generated from example definition: 2025-08-02/Workspaces_Get_MinimumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Workspaces_Get_MinimumSet_Gen.json func ExampleWorkspacesClient_Get_workspacesGetMinimumSetGen() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -276,7 +276,7 @@ func ExampleWorkspacesClient_Get_workspacesGetMinimumSetGen() { // } } -// Generated from example definition: 2025-08-02/Workspaces_ListByResourceGroup_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Workspaces_ListByResourceGroup_MaximumSet_Gen.json func ExampleWorkspacesClient_NewListByResourceGroupPager_workspacesListByResourceGroupMaximumSetGenGeneratedByMaximumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -335,7 +335,7 @@ func ExampleWorkspacesClient_NewListByResourceGroupPager_workspacesListByResourc } } -// Generated from example definition: 2025-08-02/Workspaces_ListByResourceGroup_MinimumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Workspaces_ListByResourceGroup_MinimumSet_Gen.json func ExampleWorkspacesClient_NewListByResourceGroupPager_workspacesListByResourceGroupMinimumSet() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -370,7 +370,7 @@ func ExampleWorkspacesClient_NewListByResourceGroupPager_workspacesListByResourc } } -// Generated from example definition: 2025-08-02/Workspaces_ListBySubscription_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Workspaces_ListBySubscription_MaximumSet_Gen.json func ExampleWorkspacesClient_NewListBySubscriptionPager_workspacesListBySubscriptionMaximumSetGenGeneratedByMaximumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -429,7 +429,7 @@ func ExampleWorkspacesClient_NewListBySubscriptionPager_workspacesListBySubscrip } } -// Generated from example definition: 2025-08-02/Workspaces_ListBySubscription_MinimumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Workspaces_ListBySubscription_MinimumSet_Gen.json func ExampleWorkspacesClient_NewListBySubscriptionPager_workspacesListBySubscriptionMaximumSetGenGeneratedByMinimumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -464,7 +464,7 @@ func ExampleWorkspacesClient_NewListBySubscriptionPager_workspacesListBySubscrip } } -// Generated from example definition: 2025-08-02/Workspaces_Update_MaximumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Workspaces_Update_MaximumSet_Gen.json func ExampleWorkspacesClient_Update_workspacesUpdateMaximumSetGenGeneratedByMaximumSetRule() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil { @@ -522,7 +522,7 @@ func ExampleWorkspacesClient_Update_workspacesUpdateMaximumSetGenGeneratedByMaxi // } } -// Generated from example definition: 2025-08-02/Workspaces_Update_MinimumSet_Gen.json +// Generated from example definition: 2026-06-01-preview/Workspaces_Update_MinimumSet_Gen.json func ExampleWorkspacesClient_Update_workspacesUpdateMinimumSetGen() { cred, err := azidentity.NewDefaultAzureCredential(nil) if err != nil {