sdk/resourcemanager/carbonoptimization/armcarbonoptimization/models.go (380 lines of code) (raw):

// 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 armcarbonoptimization import "time" // CarbonEmissionData - The basic response for different query report, all query report result will have these information type CarbonEmissionData struct { // REQUIRED; The data type of the query result, indicating the format of the returned response. DataType *ResponseDataTypeEnum // REQUIRED; Total carbon emissions for the specified query parameters, measured in kgCO2E. This value represents total emissions // over the specified date range (e.g., March-June). LatestMonthEmissions *float64 // REQUIRED; Total carbon emissions for the previous month’s date range, which is the same period as the specified date range // but shifted left by one month (e.g., if the specified range is March - June, the previous month’s range will be Feb - May). // The value is measured in kgCO2E. PreviousMonthEmissions *float64 // The percentage change in carbon emissions between the current and previous DateRange. This is calculated as: (latestMonthEmissions // - previousMonthEmissions) / previousMonthEmissions. MonthOverMonthEmissionsChangeRatio *float64 // The change in carbon emissions between the current and previous period, calculated as: latestMonthEmissions - previousMonthEmissions. MonthlyEmissionsChangeValue *float64 } // GetCarbonEmissionData implements the CarbonEmissionDataClassification interface for type CarbonEmissionData. func (c *CarbonEmissionData) GetCarbonEmissionData() *CarbonEmissionData { return c } // CarbonEmissionDataAvailableDateRange - Response for available date range of carbon emission data type CarbonEmissionDataAvailableDateRange struct { // REQUIRED; End date parameter, format is yyyy-MM-dd EndDate *string // REQUIRED; Start date parameter, format is yyyy-MM-dd StartDate *string } // CarbonEmissionDataListResult - List of carbon emission results type CarbonEmissionDataListResult struct { // REQUIRED; The CarbonEmissionData items on this page Value []CarbonEmissionDataClassification // The pagination token to fetch next page data, it's null or empty if it doesn't have next page data SkipToken *string // The access decision list for each input subscription SubscriptionAccessDecisionList []*SubscriptionAccessDecision } // CarbonEmissionItemDetailData - Response for detailed carbon emissions type CarbonEmissionItemDetailData struct { // REQUIRED; Item category, see supported type value defined in CategoryTypeEnum CategoryType *CategoryTypeEnum // REQUIRED; Item details data DataType *ResponseDataTypeEnum // REQUIRED; Item name, it can be resource name, resource type name, location, resource group name or subscriptionId. It depends // on category type. ItemName *string // REQUIRED; Total carbon emissions for the specified query parameters, measured in kgCO2E. This value represents total emissions // over the specified date range (e.g., March-June). LatestMonthEmissions *float64 // REQUIRED; Total carbon emissions for the previous month’s date range, which is the same period as the specified date range // but shifted left by one month (e.g., if the specified range is March - June, the previous month’s range will be Feb - May). // The value is measured in kgCO2E. PreviousMonthEmissions *float64 // The percentage change in carbon emissions between the current and previous DateRange. This is calculated as: (latestMonthEmissions // - previousMonthEmissions) / previousMonthEmissions. MonthOverMonthEmissionsChangeRatio *float64 // The change in carbon emissions between the current and previous period, calculated as: latestMonthEmissions - previousMonthEmissions. MonthlyEmissionsChangeValue *float64 } // GetCarbonEmissionData implements the CarbonEmissionDataClassification interface for type CarbonEmissionItemDetailData. func (c *CarbonEmissionItemDetailData) GetCarbonEmissionData() *CarbonEmissionData { return &CarbonEmissionData{ DataType: c.DataType, LatestMonthEmissions: c.LatestMonthEmissions, MonthOverMonthEmissionsChangeRatio: c.MonthOverMonthEmissionsChangeRatio, MonthlyEmissionsChangeValue: c.MonthlyEmissionsChangeValue, PreviousMonthEmissions: c.PreviousMonthEmissions, } } // CarbonEmissionMonthlySummaryData - Response for Monthly Carbon Emissions Summary type CarbonEmissionMonthlySummaryData struct { // REQUIRED; Carbon intensity for the specified month, typically in units of kgCO2E per unit of normalized usage CarbonIntensity *float64 // REQUIRED; Monthly summary data DataType *ResponseDataTypeEnum // REQUIRED; The date, representing the month, for which the emissions data is reported, formatted as yyyy-MM-dd (e.g., 2024-03-01) Date *string // REQUIRED; Total carbon emissions for the specified query parameters, measured in kgCO2E. This value represents total emissions // over the specified date range (e.g., March-June). LatestMonthEmissions *float64 // REQUIRED; Total carbon emissions for the previous month’s date range, which is the same period as the specified date range // but shifted left by one month (e.g., if the specified range is March - June, the previous month’s range will be Feb - May). // The value is measured in kgCO2E. PreviousMonthEmissions *float64 // The percentage change in carbon emissions between the current and previous DateRange. This is calculated as: (latestMonthEmissions // - previousMonthEmissions) / previousMonthEmissions. MonthOverMonthEmissionsChangeRatio *float64 // The change in carbon emissions between the current and previous period, calculated as: latestMonthEmissions - previousMonthEmissions. MonthlyEmissionsChangeValue *float64 } // GetCarbonEmissionData implements the CarbonEmissionDataClassification interface for type CarbonEmissionMonthlySummaryData. func (c *CarbonEmissionMonthlySummaryData) GetCarbonEmissionData() *CarbonEmissionData { return &CarbonEmissionData{ DataType: c.DataType, LatestMonthEmissions: c.LatestMonthEmissions, MonthOverMonthEmissionsChangeRatio: c.MonthOverMonthEmissionsChangeRatio, MonthlyEmissionsChangeValue: c.MonthlyEmissionsChangeValue, PreviousMonthEmissions: c.PreviousMonthEmissions, } } // CarbonEmissionOverallSummaryData - Response for Overall Carbon Emissions Summary type CarbonEmissionOverallSummaryData struct { // REQUIRED; Overall summary data DataType *ResponseDataTypeEnum // REQUIRED; Total carbon emissions for the specified query parameters, measured in kgCO2E. This value represents total emissions // over the specified date range (e.g., March-June). LatestMonthEmissions *float64 // REQUIRED; Total carbon emissions for the previous month’s date range, which is the same period as the specified date range // but shifted left by one month (e.g., if the specified range is March - June, the previous month’s range will be Feb - May). // The value is measured in kgCO2E. PreviousMonthEmissions *float64 // The percentage change in carbon emissions between the current and previous DateRange. This is calculated as: (latestMonthEmissions // - previousMonthEmissions) / previousMonthEmissions. MonthOverMonthEmissionsChangeRatio *float64 // The change in carbon emissions between the current and previous period, calculated as: latestMonthEmissions - previousMonthEmissions. MonthlyEmissionsChangeValue *float64 } // GetCarbonEmissionData implements the CarbonEmissionDataClassification interface for type CarbonEmissionOverallSummaryData. func (c *CarbonEmissionOverallSummaryData) GetCarbonEmissionData() *CarbonEmissionData { return &CarbonEmissionData{ DataType: c.DataType, LatestMonthEmissions: c.LatestMonthEmissions, MonthOverMonthEmissionsChangeRatio: c.MonthOverMonthEmissionsChangeRatio, MonthlyEmissionsChangeValue: c.MonthlyEmissionsChangeValue, PreviousMonthEmissions: c.PreviousMonthEmissions, } } // CarbonEmissionTopItemMonthlySummaryData - Response for Top Items Carbon Emissions by Month type CarbonEmissionTopItemMonthlySummaryData struct { // REQUIRED; Item category, see supported type value defined in CategoryTypeEnum CategoryType *CategoryTypeEnum // REQUIRED; Top items Monthly summary data DataType *ResponseDataTypeEnum // REQUIRED; The date, representing the month, for which the emissions data is reported, formatted as yyyy-MM-dd (e.g., 2024-03-01) Date *string // REQUIRED; Item name, it can be resource name, resource type name, location, resource group name or subscriptionId. It depends // on category type. ItemName *string // REQUIRED; Total carbon emissions for the specified query parameters, measured in kgCO2E. This value represents total emissions // over the specified date range (e.g., March-June). LatestMonthEmissions *float64 // REQUIRED; Total carbon emissions for the previous month’s date range, which is the same period as the specified date range // but shifted left by one month (e.g., if the specified range is March - June, the previous month’s range will be Feb - May). // The value is measured in kgCO2E. PreviousMonthEmissions *float64 // The percentage change in carbon emissions between the current and previous DateRange. This is calculated as: (latestMonthEmissions // - previousMonthEmissions) / previousMonthEmissions. MonthOverMonthEmissionsChangeRatio *float64 // The change in carbon emissions between the current and previous period, calculated as: latestMonthEmissions - previousMonthEmissions. MonthlyEmissionsChangeValue *float64 } // GetCarbonEmissionData implements the CarbonEmissionDataClassification interface for type CarbonEmissionTopItemMonthlySummaryData. func (c *CarbonEmissionTopItemMonthlySummaryData) GetCarbonEmissionData() *CarbonEmissionData { return &CarbonEmissionData{ DataType: c.DataType, LatestMonthEmissions: c.LatestMonthEmissions, MonthOverMonthEmissionsChangeRatio: c.MonthOverMonthEmissionsChangeRatio, MonthlyEmissionsChangeValue: c.MonthlyEmissionsChangeValue, PreviousMonthEmissions: c.PreviousMonthEmissions, } } // CarbonEmissionTopItemsSummaryData - Response for Top Items by Category Type type CarbonEmissionTopItemsSummaryData struct { // REQUIRED; The category type of the item. This defines which dimension the emissions are aggregated by, and the supported // values are defined in CategoryTypeEnum (e.g., Subscription, ResourceGroup, Resource, etc.). CategoryType *CategoryTypeEnum // REQUIRED; Top items summary data DataType *ResponseDataTypeEnum // REQUIRED; The identifier of the item being reported on, which could refer to the resource name, resource type name, location, // resource group name, or subscription ID, depending on the specified category type. ItemName *string // REQUIRED; Total carbon emissions for the specified query parameters, measured in kgCO2E. This value represents total emissions // over the specified date range (e.g., March-June). LatestMonthEmissions *float64 // REQUIRED; Total carbon emissions for the previous month’s date range, which is the same period as the specified date range // but shifted left by one month (e.g., if the specified range is March - June, the previous month’s range will be Feb - May). // The value is measured in kgCO2E. PreviousMonthEmissions *float64 // The percentage change in carbon emissions between the current and previous DateRange. This is calculated as: (latestMonthEmissions // - previousMonthEmissions) / previousMonthEmissions. MonthOverMonthEmissionsChangeRatio *float64 // The change in carbon emissions between the current and previous period, calculated as: latestMonthEmissions - previousMonthEmissions. MonthlyEmissionsChangeValue *float64 } // GetCarbonEmissionData implements the CarbonEmissionDataClassification interface for type CarbonEmissionTopItemsSummaryData. func (c *CarbonEmissionTopItemsSummaryData) GetCarbonEmissionData() *CarbonEmissionData { return &CarbonEmissionData{ DataType: c.DataType, LatestMonthEmissions: c.LatestMonthEmissions, MonthOverMonthEmissionsChangeRatio: c.MonthOverMonthEmissionsChangeRatio, MonthlyEmissionsChangeValue: c.MonthlyEmissionsChangeValue, PreviousMonthEmissions: c.PreviousMonthEmissions, } } // DateRange - Date range to be used with QueryParameter, it should be within 12 months between start and end date. In certain // cases, start and end dates must be the same date. type DateRange struct { // REQUIRED; End date parameter in yyyy-MM-01 format. Only the first day of each month is accepted. End *time.Time // REQUIRED; Start date parameter in yyyy-MM-01 format. Only the first day of each month is accepted. Start *time.Time } // ItemDetailsQueryFilter - Query Parameters for ItemDetailsReport type ItemDetailsQueryFilter struct { // REQUIRED; List of carbon emission scopes. Required. Accepts one or more values from EmissionScopeEnum (e.g., Scope1, Scope2, // Scope3) in list form. The output will include the total emissions for the specified scopes. CarbonScopeList []*EmissionScopeEnum // REQUIRED; Specifies the category type for detailed emissions data, such as Resource, ResourceGroup, ResourceType, Location, // or Subscription. See supported types in CategoryTypeEnum. CategoryType *CategoryTypeEnum // REQUIRED; The start and end dates for carbon emissions data. Required. For ItemDetailsReport and TopItemsSummaryReport, // only one month of data is supported at a time, so start and end dates should be equal within DateRange (e.g., start: 2024-06-01 // and end: 2024-06-01). DateRange *DateRange // REQUIRED; The column name to order the results by. See supported values in OrderByColumnEnum. OrderBy *OrderByColumnEnum // REQUIRED; Number of items to return in one request, max value is 5000. PageSize *int32 // CONSTANT; Specifies that the report type is an item details report for granular carbon emissions data. This is a paginated // report. // Field has constant value ReportTypeEnumItemDetailsReport, any specified value is ignored. ReportType *ReportTypeEnum // REQUIRED; Direction for sorting results. See supported values in SortDirectionEnum. SortDirection *SortDirectionEnum // REQUIRED; List of subscription IDs for which carbon emissions data is requested. Required. Each subscription ID should // be in lowercase format. The max length of list is 100. SubscriptionList []*string // List of locations(Azure Region Display Name) for carbon emissions data, with each location specified in lowercase (e.g., // 'east us'). Optional. You can use the command 'az account list-locations -o table' to find Azure Region Display Names. LocationList []*string // List of resource group URLs for carbon emissions data. Optional. Each URL must follow the format '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}', // and should be in all lowercase. ResourceGroupURLList []*string // List of resource types for carbon emissions data. Optional. Each resource type should be specified in lowercase, following // the format 'microsoft.{service}/{resourceType}', e.g., 'microsoft.storage/storageaccounts'. ResourceTypeList []*string // Pagination token for fetching the next page of data. This token is nullable and will be returned in the previous response // if additional data pages are available. SkipToken *string } // GetQueryFilter implements the QueryFilterClassification interface for type ItemDetailsQueryFilter. func (i *ItemDetailsQueryFilter) GetQueryFilter() *QueryFilter { return &QueryFilter{ CarbonScopeList: i.CarbonScopeList, DateRange: i.DateRange, LocationList: i.LocationList, ReportType: i.ReportType, ResourceGroupURLList: i.ResourceGroupURLList, ResourceTypeList: i.ResourceTypeList, SubscriptionList: i.SubscriptionList, } } // MonthlySummaryReportQueryFilter - Query filter parameter to configure MonthlySummaryReport queries. type MonthlySummaryReportQueryFilter struct { // REQUIRED; List of carbon emission scopes. Required. Accepts one or more values from EmissionScopeEnum (e.g., Scope1, Scope2, // Scope3) in list form. The output will include the total emissions for the specified scopes. CarbonScopeList []*EmissionScopeEnum // REQUIRED; The start and end dates for carbon emissions data. Required. For ItemDetailsReport and TopItemsSummaryReport, // only one month of data is supported at a time, so start and end dates should be equal within DateRange (e.g., start: 2024-06-01 // and end: 2024-06-01). DateRange *DateRange // CONSTANT; Specifies that the report type is a monthly summary report for carbon emissions data. // Field has constant value ReportTypeEnumMonthlySummaryReport, any specified value is ignored. ReportType *ReportTypeEnum // REQUIRED; List of subscription IDs for which carbon emissions data is requested. Required. Each subscription ID should // be in lowercase format. The max length of list is 100. SubscriptionList []*string // List of locations(Azure Region Display Name) for carbon emissions data, with each location specified in lowercase (e.g., // 'east us'). Optional. You can use the command 'az account list-locations -o table' to find Azure Region Display Names. LocationList []*string // List of resource group URLs for carbon emissions data. Optional. Each URL must follow the format '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}', // and should be in all lowercase. ResourceGroupURLList []*string // List of resource types for carbon emissions data. Optional. Each resource type should be specified in lowercase, following // the format 'microsoft.{service}/{resourceType}', e.g., 'microsoft.storage/storageaccounts'. ResourceTypeList []*string } // GetQueryFilter implements the QueryFilterClassification interface for type MonthlySummaryReportQueryFilter. func (m *MonthlySummaryReportQueryFilter) GetQueryFilter() *QueryFilter { return &QueryFilter{ CarbonScopeList: m.CarbonScopeList, DateRange: m.DateRange, LocationList: m.LocationList, ReportType: m.ReportType, ResourceGroupURLList: m.ResourceGroupURLList, ResourceTypeList: m.ResourceTypeList, SubscriptionList: m.SubscriptionList, } } // Operation - Details of a REST API operation, returned from the Resource Provider Operations API type Operation struct { // Localized display information for this particular operation. Display *OperationDisplay // READ-ONLY; Extensible enum. Indicates the action type. "Internal" refers to actions that are for internal only APIs. ActionType *ActionType // READ-ONLY; Whether the operation applies to data-plane. This is "true" for data-plane operations and "false" for Azure // Resource Manager/control-plane operations. IsDataAction *bool // READ-ONLY; The name of the operation, as per Resource-Based Access Control (RBAC). Examples: "Microsoft.Compute/virtualMachines/write", // "Microsoft.Compute/virtualMachines/capture/action" Name *string // READ-ONLY; The intended executor of the operation; as in Resource Based Access Control (RBAC) and audit logs UX. Default // value is "user,system" Origin *Origin } // OperationDisplay - Localized display information for and operation. type OperationDisplay struct { // READ-ONLY; The short, localized friendly description of the operation; suitable for tool tips and detailed views. Description *string // READ-ONLY; The concise, localized friendly name for the operation; suitable for dropdowns. E.g. "Create or Update Virtual // Machine", "Restart Virtual Machine". Operation *string // READ-ONLY; The localized friendly form of the resource provider name, e.g. "Microsoft Monitoring Insights" or "Microsoft // Compute". Provider *string // READ-ONLY; The localized friendly name of the resource type related to this operation. E.g. "Virtual Machines" or "Job // Schedule Collections". Resource *string } // OperationListResult - A list of REST API operations supported by an Azure Resource Provider. It contains an URL link to // get the next set of results. type OperationListResult struct { // REQUIRED; The Operation items on this page Value []*Operation // The link to the next page of items NextLink *string } // OverallSummaryReportQueryFilter - Query filter parameter to configure OverallSummaryReport queries. type OverallSummaryReportQueryFilter struct { // REQUIRED; List of carbon emission scopes. Required. Accepts one or more values from EmissionScopeEnum (e.g., Scope1, Scope2, // Scope3) in list form. The output will include the total emissions for the specified scopes. CarbonScopeList []*EmissionScopeEnum // REQUIRED; The start and end dates for carbon emissions data. Required. For ItemDetailsReport and TopItemsSummaryReport, // only one month of data is supported at a time, so start and end dates should be equal within DateRange (e.g., start: 2024-06-01 // and end: 2024-06-01). DateRange *DateRange // CONSTANT; Specifies that the report type is a overall summary report for carbon emissions data. // Field has constant value ReportTypeEnumOverallSummaryReport, any specified value is ignored. ReportType *ReportTypeEnum // REQUIRED; List of subscription IDs for which carbon emissions data is requested. Required. Each subscription ID should // be in lowercase format. The max length of list is 100. SubscriptionList []*string // List of locations(Azure Region Display Name) for carbon emissions data, with each location specified in lowercase (e.g., // 'east us'). Optional. You can use the command 'az account list-locations -o table' to find Azure Region Display Names. LocationList []*string // List of resource group URLs for carbon emissions data. Optional. Each URL must follow the format '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}', // and should be in all lowercase. ResourceGroupURLList []*string // List of resource types for carbon emissions data. Optional. Each resource type should be specified in lowercase, following // the format 'microsoft.{service}/{resourceType}', e.g., 'microsoft.storage/storageaccounts'. ResourceTypeList []*string } // GetQueryFilter implements the QueryFilterClassification interface for type OverallSummaryReportQueryFilter. func (o *OverallSummaryReportQueryFilter) GetQueryFilter() *QueryFilter { return &QueryFilter{ CarbonScopeList: o.CarbonScopeList, DateRange: o.DateRange, LocationList: o.LocationList, ReportType: o.ReportType, ResourceGroupURLList: o.ResourceGroupURLList, ResourceTypeList: o.ResourceTypeList, SubscriptionList: o.SubscriptionList, } } // QueryFilter - Shared query filter parameter to configure carbon emissions data queries for all different report type defined // in ReportTypeEnum. type QueryFilter struct { // REQUIRED; List of carbon emission scopes. Required. Accepts one or more values from EmissionScopeEnum (e.g., Scope1, Scope2, // Scope3) in list form. The output will include the total emissions for the specified scopes. CarbonScopeList []*EmissionScopeEnum // REQUIRED; The start and end dates for carbon emissions data. Required. For ItemDetailsReport and TopItemsSummaryReport, // only one month of data is supported at a time, so start and end dates should be equal within DateRange (e.g., start: 2024-06-01 // and end: 2024-06-01). DateRange *DateRange // REQUIRED; The ReportType requested for carbon emissions data. Required. Specifies how data is aggregated and displayed // in the output, as explained in the ReportTypeEnum. ReportType *ReportTypeEnum // REQUIRED; List of subscription IDs for which carbon emissions data is requested. Required. Each subscription ID should // be in lowercase format. The max length of list is 100. SubscriptionList []*string // List of locations(Azure Region Display Name) for carbon emissions data, with each location specified in lowercase (e.g., // 'east us'). Optional. You can use the command 'az account list-locations -o table' to find Azure Region Display Names. LocationList []*string // List of resource group URLs for carbon emissions data. Optional. Each URL must follow the format '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}', // and should be in all lowercase. ResourceGroupURLList []*string // List of resource types for carbon emissions data. Optional. Each resource type should be specified in lowercase, following // the format 'microsoft.{service}/{resourceType}', e.g., 'microsoft.storage/storageaccounts'. ResourceTypeList []*string } // GetQueryFilter implements the QueryFilterClassification interface for type QueryFilter. func (q *QueryFilter) GetQueryFilter() *QueryFilter { return q } // ResourceCarbonEmissionItemDetailData - Response for Resource detailed carbon emissions type ResourceCarbonEmissionItemDetailData struct { // REQUIRED; Resource Item category, see supported value defined in CategoryTypeEnum CategoryType *CategoryTypeEnum // REQUIRED; ResourceGroup's item details data DataType *ResponseDataTypeEnum // REQUIRED; It's resource name. ItemName *string // REQUIRED; Total carbon emissions for the specified query parameters, measured in kgCO2E. This value represents total emissions // over the specified date range (e.g., March-June). LatestMonthEmissions *float64 // REQUIRED; Total carbon emissions for the previous month’s date range, which is the same period as the specified date range // but shifted left by one month (e.g., if the specified range is March - June, the previous month’s range will be Feb - May). // The value is measured in kgCO2E. PreviousMonthEmissions *float64 // REQUIRED; Resource Group ResourceGroup *string // REQUIRED; The fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ResourceID *string // REQUIRED; Subscription Id SubscriptionID *string // Resource Location (e.g., 'east us'). Location *string // The percentage change in carbon emissions between the current and previous DateRange. This is calculated as: (latestMonthEmissions // - previousMonthEmissions) / previousMonthEmissions. MonthOverMonthEmissionsChangeRatio *float64 // The change in carbon emissions between the current and previous period, calculated as: latestMonthEmissions - previousMonthEmissions. MonthlyEmissionsChangeValue *float64 // The type of resource, for example: microsoft.storage/storageaccounts ResourceType *string } // GetCarbonEmissionData implements the CarbonEmissionDataClassification interface for type ResourceCarbonEmissionItemDetailData. func (r *ResourceCarbonEmissionItemDetailData) GetCarbonEmissionData() *CarbonEmissionData { return &CarbonEmissionData{ DataType: r.DataType, LatestMonthEmissions: r.LatestMonthEmissions, MonthOverMonthEmissionsChangeRatio: r.MonthOverMonthEmissionsChangeRatio, MonthlyEmissionsChangeValue: r.MonthlyEmissionsChangeValue, PreviousMonthEmissions: r.PreviousMonthEmissions, } } // ResourceCarbonEmissionTopItemMonthlySummaryData - Response for top items carbon emissions by month for resource type ResourceCarbonEmissionTopItemMonthlySummaryData struct { // REQUIRED; Resource Item category CategoryType *CategoryTypeEnum // REQUIRED; Resource top items Monthly summary data DataType *ResponseDataTypeEnum // REQUIRED; Monthly date string, format is yyyy-MM-dd Date *string // REQUIRED; The resource name of resource for Resource Category ItemName *string // REQUIRED; Total carbon emissions for the specified query parameters, measured in kgCO2E. This value represents total emissions // over the specified date range (e.g., March-June). LatestMonthEmissions *float64 // REQUIRED; Total carbon emissions for the previous month’s date range, which is the same period as the specified date range // but shifted left by one month (e.g., if the specified range is March - June, the previous month’s range will be Feb - May). // The value is measured in kgCO2E. PreviousMonthEmissions *float64 // REQUIRED; Resource Group ResourceGroup *string // REQUIRED; The fully qualified resource ID for the resource. Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/{resourceProviderNamespace}/{resourceType}/{resourceName} ResourceID *string // REQUIRED; Subscription Id SubscriptionID *string // The percentage change in carbon emissions between the current and previous DateRange. This is calculated as: (latestMonthEmissions // - previousMonthEmissions) / previousMonthEmissions. MonthOverMonthEmissionsChangeRatio *float64 // The change in carbon emissions between the current and previous period, calculated as: latestMonthEmissions - previousMonthEmissions. MonthlyEmissionsChangeValue *float64 } // GetCarbonEmissionData implements the CarbonEmissionDataClassification interface for type ResourceCarbonEmissionTopItemMonthlySummaryData. func (r *ResourceCarbonEmissionTopItemMonthlySummaryData) GetCarbonEmissionData() *CarbonEmissionData { return &CarbonEmissionData{ DataType: r.DataType, LatestMonthEmissions: r.LatestMonthEmissions, MonthOverMonthEmissionsChangeRatio: r.MonthOverMonthEmissionsChangeRatio, MonthlyEmissionsChangeValue: r.MonthlyEmissionsChangeValue, PreviousMonthEmissions: r.PreviousMonthEmissions, } } // ResourceCarbonEmissionTopItemsSummaryData - Response for Top Items For Resource Category type ResourceCarbonEmissionTopItemsSummaryData struct { // REQUIRED; The category type of the item. This defines which dimension the emissions are aggregated by, and the supported // values are defined in CategoryTypeEnum (e.g., Subscription, ResourceGroup, Resource, etc.). CategoryType *CategoryTypeEnum // REQUIRED; Data for the top items carbon emissions summary report specific to resource category DataType *ResponseDataTypeEnum // REQUIRED; The resource name of the resource for the Resource Category. ItemName *string // REQUIRED; Total carbon emissions for the specified query parameters, measured in kgCO2E. This value represents total emissions // over the specified date range (e.g., March-June). LatestMonthEmissions *float64 // REQUIRED; Total carbon emissions for the previous month’s date range, which is the same period as the specified date range // but shifted left by one month (e.g., if the specified range is March - June, the previous month’s range will be Feb - May). // The value is measured in kgCO2E. PreviousMonthEmissions *float64 // REQUIRED; Resource group name ResourceGroup *string // REQUIRED; Resource Id, The URI of the resource for the Resource Category. This identifies the resource being reported. ResourceID *string // REQUIRED; Subscription Id SubscriptionID *string // The percentage change in carbon emissions between the current and previous DateRange. This is calculated as: (latestMonthEmissions // - previousMonthEmissions) / previousMonthEmissions. MonthOverMonthEmissionsChangeRatio *float64 // The change in carbon emissions between the current and previous period, calculated as: latestMonthEmissions - previousMonthEmissions. MonthlyEmissionsChangeValue *float64 } // GetCarbonEmissionData implements the CarbonEmissionDataClassification interface for type ResourceCarbonEmissionTopItemsSummaryData. func (r *ResourceCarbonEmissionTopItemsSummaryData) GetCarbonEmissionData() *CarbonEmissionData { return &CarbonEmissionData{ DataType: r.DataType, LatestMonthEmissions: r.LatestMonthEmissions, MonthOverMonthEmissionsChangeRatio: r.MonthOverMonthEmissionsChangeRatio, MonthlyEmissionsChangeValue: r.MonthlyEmissionsChangeValue, PreviousMonthEmissions: r.PreviousMonthEmissions, } } // ResourceGroupCarbonEmissionItemDetailData - Response for Resource Group detailed carbon emissions type ResourceGroupCarbonEmissionItemDetailData struct { // REQUIRED; ResourceGroup Item category CategoryType *CategoryTypeEnum // REQUIRED; ResourceGroup item details data DataType *ResponseDataTypeEnum // REQUIRED; It's resource group name ItemName *string // REQUIRED; Total carbon emissions for the specified query parameters, measured in kgCO2E. This value represents total emissions // over the specified date range (e.g., March-June). LatestMonthEmissions *float64 // REQUIRED; Total carbon emissions for the previous month’s date range, which is the same period as the specified date range // but shifted left by one month (e.g., if the specified range is March - June, the previous month’s range will be Feb - May). // The value is measured in kgCO2E. PreviousMonthEmissions *float64 // REQUIRED; Resource Group url, value format is '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}' ResourceGroupURL *string // REQUIRED; Subscription Id SubscriptionID *string // The percentage change in carbon emissions between the current and previous DateRange. This is calculated as: (latestMonthEmissions // - previousMonthEmissions) / previousMonthEmissions. MonthOverMonthEmissionsChangeRatio *float64 // The change in carbon emissions between the current and previous period, calculated as: latestMonthEmissions - previousMonthEmissions. MonthlyEmissionsChangeValue *float64 } // GetCarbonEmissionData implements the CarbonEmissionDataClassification interface for type ResourceGroupCarbonEmissionItemDetailData. func (r *ResourceGroupCarbonEmissionItemDetailData) GetCarbonEmissionData() *CarbonEmissionData { return &CarbonEmissionData{ DataType: r.DataType, LatestMonthEmissions: r.LatestMonthEmissions, MonthOverMonthEmissionsChangeRatio: r.MonthOverMonthEmissionsChangeRatio, MonthlyEmissionsChangeValue: r.MonthlyEmissionsChangeValue, PreviousMonthEmissions: r.PreviousMonthEmissions, } } // ResourceGroupCarbonEmissionTopItemMonthlySummaryData - Response for top items carbon emissions by month for resource group type ResourceGroupCarbonEmissionTopItemMonthlySummaryData struct { // REQUIRED; ResourceGroup Item category CategoryType *CategoryTypeEnum // REQUIRED; Resource group top items Monthly summary data DataType *ResponseDataTypeEnum // REQUIRED; Monthly date string, format is yyyy-MM-dd Date *string // REQUIRED; It's resource group name for ResourceGroup category ItemName *string // REQUIRED; Total carbon emissions for the specified query parameters, measured in kgCO2E. This value represents total emissions // over the specified date range (e.g., March-June). LatestMonthEmissions *float64 // REQUIRED; Total carbon emissions for the previous month’s date range, which is the same period as the specified date range // but shifted left by one month (e.g., if the specified range is March - June, the previous month’s range will be Feb - May). // The value is measured in kgCO2E. PreviousMonthEmissions *float64 // REQUIRED; Resource Group url, the format is '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}' ResourceGroupURL *string // REQUIRED; Subscription Id SubscriptionID *string // The percentage change in carbon emissions between the current and previous DateRange. This is calculated as: (latestMonthEmissions // - previousMonthEmissions) / previousMonthEmissions. MonthOverMonthEmissionsChangeRatio *float64 // The change in carbon emissions between the current and previous period, calculated as: latestMonthEmissions - previousMonthEmissions. MonthlyEmissionsChangeValue *float64 } // GetCarbonEmissionData implements the CarbonEmissionDataClassification interface for type ResourceGroupCarbonEmissionTopItemMonthlySummaryData. func (r *ResourceGroupCarbonEmissionTopItemMonthlySummaryData) GetCarbonEmissionData() *CarbonEmissionData { return &CarbonEmissionData{ DataType: r.DataType, LatestMonthEmissions: r.LatestMonthEmissions, MonthOverMonthEmissionsChangeRatio: r.MonthOverMonthEmissionsChangeRatio, MonthlyEmissionsChangeValue: r.MonthlyEmissionsChangeValue, PreviousMonthEmissions: r.PreviousMonthEmissions, } } // ResourceGroupCarbonEmissionTopItemsSummaryData - Response for Top Items For ResourceGroup type ResourceGroupCarbonEmissionTopItemsSummaryData struct { // REQUIRED; ResourceGroup Item category CategoryType *CategoryTypeEnum // REQUIRED; Resource group top items summary data DataType *ResponseDataTypeEnum // REQUIRED; The resourceGroup name of the resource for ResourceGroup Category ItemName *string // REQUIRED; Total carbon emissions for the specified query parameters, measured in kgCO2E. This value represents total emissions // over the specified date range (e.g., March-June). LatestMonthEmissions *float64 // REQUIRED; Total carbon emissions for the previous month’s date range, which is the same period as the specified date range // but shifted left by one month (e.g., if the specified range is March - June, the previous month’s range will be Feb - May). // The value is measured in kgCO2E. PreviousMonthEmissions *float64 // REQUIRED; Resource Group url, value format is '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}' ResourceGroupURL *string // REQUIRED; Subscription Id SubscriptionID *string // The percentage change in carbon emissions between the current and previous DateRange. This is calculated as: (latestMonthEmissions // - previousMonthEmissions) / previousMonthEmissions. MonthOverMonthEmissionsChangeRatio *float64 // The change in carbon emissions between the current and previous period, calculated as: latestMonthEmissions - previousMonthEmissions. MonthlyEmissionsChangeValue *float64 } // GetCarbonEmissionData implements the CarbonEmissionDataClassification interface for type ResourceGroupCarbonEmissionTopItemsSummaryData. func (r *ResourceGroupCarbonEmissionTopItemsSummaryData) GetCarbonEmissionData() *CarbonEmissionData { return &CarbonEmissionData{ DataType: r.DataType, LatestMonthEmissions: r.LatestMonthEmissions, MonthOverMonthEmissionsChangeRatio: r.MonthOverMonthEmissionsChangeRatio, MonthlyEmissionsChangeValue: r.MonthlyEmissionsChangeValue, PreviousMonthEmissions: r.PreviousMonthEmissions, } } // SubscriptionAccessDecision - Access Decision for each Subscription type SubscriptionAccessDecision struct { // REQUIRED; Access decision to subscription Decision *AccessDecisionEnum // REQUIRED; Id of Subscription SubscriptionID *string // The reason why access request got denied DenialReason *string } // TopItemsMonthlySummaryReportQueryFilter - Query filter parameter to configure TopItemsMonthlySummaryReport queries. type TopItemsMonthlySummaryReportQueryFilter struct { // REQUIRED; List of carbon emission scopes. Required. Accepts one or more values from EmissionScopeEnum (e.g., Scope1, Scope2, // Scope3) in list form. The output will include the total emissions for the specified scopes. CarbonScopeList []*EmissionScopeEnum // REQUIRED; Specifies the category type to retrieve top-emitting items, aggregated by month. See supported types in CategoryTypeEnum. CategoryType *CategoryTypeEnum // REQUIRED; The start and end dates for carbon emissions data. Required. For ItemDetailsReport and TopItemsSummaryReport, // only one month of data is supported at a time, so start and end dates should be equal within DateRange (e.g., start: 2024-06-01 // and end: 2024-06-01). DateRange *DateRange // CONSTANT; Specifies that the report type is a top items monthly summary report for carbon emissions data. // Field has constant value ReportTypeEnumTopItemsMonthlySummaryReport, any specified value is ignored. ReportType *ReportTypeEnum // REQUIRED; List of subscription IDs for which carbon emissions data is requested. Required. Each subscription ID should // be in lowercase format. The max length of list is 100. SubscriptionList []*string // REQUIRED; The number of top items to return, based on emissions. Must be between 1 and 10. TopItems *int32 // List of locations(Azure Region Display Name) for carbon emissions data, with each location specified in lowercase (e.g., // 'east us'). Optional. You can use the command 'az account list-locations -o table' to find Azure Region Display Names. LocationList []*string // List of resource group URLs for carbon emissions data. Optional. Each URL must follow the format '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}', // and should be in all lowercase. ResourceGroupURLList []*string // List of resource types for carbon emissions data. Optional. Each resource type should be specified in lowercase, following // the format 'microsoft.{service}/{resourceType}', e.g., 'microsoft.storage/storageaccounts'. ResourceTypeList []*string } // GetQueryFilter implements the QueryFilterClassification interface for type TopItemsMonthlySummaryReportQueryFilter. func (t *TopItemsMonthlySummaryReportQueryFilter) GetQueryFilter() *QueryFilter { return &QueryFilter{ CarbonScopeList: t.CarbonScopeList, DateRange: t.DateRange, LocationList: t.LocationList, ReportType: t.ReportType, ResourceGroupURLList: t.ResourceGroupURLList, ResourceTypeList: t.ResourceTypeList, SubscriptionList: t.SubscriptionList, } } // TopItemsSummaryReportQueryFilter - Query filter parameter to configure TopItemsSummaryReport queries. type TopItemsSummaryReportQueryFilter struct { // REQUIRED; List of carbon emission scopes. Required. Accepts one or more values from EmissionScopeEnum (e.g., Scope1, Scope2, // Scope3) in list form. The output will include the total emissions for the specified scopes. CarbonScopeList []*EmissionScopeEnum // REQUIRED; Specifies the category type for which to retrieve top-emitting items. See supported values defined in CategoryTypeEnum. CategoryType *CategoryTypeEnum // REQUIRED; The start and end dates for carbon emissions data. Required. For ItemDetailsReport and TopItemsSummaryReport, // only one month of data is supported at a time, so start and end dates should be equal within DateRange (e.g., start: 2024-06-01 // and end: 2024-06-01). DateRange *DateRange // CONSTANT; Specifies that the report type is a top items summary report for carbon emissions data, aggregated by category // type. // Field has constant value ReportTypeEnumTopItemsSummaryReport, any specified value is ignored. ReportType *ReportTypeEnum // REQUIRED; List of subscription IDs for which carbon emissions data is requested. Required. Each subscription ID should // be in lowercase format. The max length of list is 100. SubscriptionList []*string // REQUIRED; The number of top items to return, based on emissions. This value must be between 1 and 10. TopItems *int32 // List of locations(Azure Region Display Name) for carbon emissions data, with each location specified in lowercase (e.g., // 'east us'). Optional. You can use the command 'az account list-locations -o table' to find Azure Region Display Names. LocationList []*string // List of resource group URLs for carbon emissions data. Optional. Each URL must follow the format '/subscriptions/{subscriptionId}/resourcegroups/{resourceGroup}', // and should be in all lowercase. ResourceGroupURLList []*string // List of resource types for carbon emissions data. Optional. Each resource type should be specified in lowercase, following // the format 'microsoft.{service}/{resourceType}', e.g., 'microsoft.storage/storageaccounts'. ResourceTypeList []*string } // GetQueryFilter implements the QueryFilterClassification interface for type TopItemsSummaryReportQueryFilter. func (t *TopItemsSummaryReportQueryFilter) GetQueryFilter() *QueryFilter { return &QueryFilter{ CarbonScopeList: t.CarbonScopeList, DateRange: t.DateRange, LocationList: t.LocationList, ReportType: t.ReportType, ResourceGroupURLList: t.ResourceGroupURLList, ResourceTypeList: t.ResourceTypeList, SubscriptionList: t.SubscriptionList, } }