Skip to content

Commit 00b452e

Browse files
Launch itemized custom line item and service line item filter
1 parent b61c403 commit 00b452e

File tree

7 files changed

+129
-12
lines changed

7 files changed

+129
-12
lines changed

generator/ServiceModels/billingconductor/billingconductor-2021-07-30.api.json

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,18 @@
737737
"Value":{"shape":"String"}
738738
}
739739
},
740+
"AttributeValue":{
741+
"type":"string",
742+
"max":128,
743+
"min":1,
744+
"pattern":"[a-zA-Z0-9]+"
745+
},
746+
"AttributeValueList":{
747+
"type":"list",
748+
"member":{"shape":"AttributeValue"},
749+
"max":1,
750+
"min":0
751+
},
740752
"AttributesList":{
741753
"type":"list",
742754
"member":{"shape":"Attribute"}
@@ -924,7 +936,10 @@
924936
},
925937
"ComputationRuleEnum":{
926938
"type":"string",
927-
"enum":["CONSOLIDATED"]
939+
"enum":[
940+
"ITEMIZED",
941+
"CONSOLIDATED"
942+
]
928943
},
929944
"ConflictException":{
930945
"type":"structure",
@@ -1408,18 +1423,21 @@
14081423
"type":"structure",
14091424
"required":[
14101425
"Attribute",
1411-
"MatchOption",
1412-
"Values"
1426+
"MatchOption"
14131427
],
14141428
"members":{
14151429
"Attribute":{"shape":"LineItemFilterAttributeName"},
14161430
"MatchOption":{"shape":"MatchOption"},
1417-
"Values":{"shape":"LineItemFilterValuesList"}
1431+
"Values":{"shape":"LineItemFilterValuesList"},
1432+
"AttributeValues":{"shape":"AttributeValueList"}
14181433
}
14191434
},
14201435
"LineItemFilterAttributeName":{
14211436
"type":"string",
1422-
"enum":["LINE_ITEM_TYPE"]
1437+
"enum":[
1438+
"LINE_ITEM_TYPE",
1439+
"SERVICE"
1440+
]
14231441
},
14241442
"LineItemFilterValue":{
14251443
"type":"string",
@@ -1739,7 +1757,10 @@
17391757
"MarginPercentage":{"type":"string"},
17401758
"MatchOption":{
17411759
"type":"string",
1742-
"enum":["NOT_EQUAL"]
1760+
"enum":[
1761+
"NOT_EQUAL",
1762+
"EQUAL"
1763+
]
17431764
},
17441765
"MaxBillingGroupCostReportResults":{
17451766
"type":"integer",
@@ -2339,6 +2360,7 @@
23392360
"ILLEGAL_MODIFIER_PERCENTAGE",
23402361
"ILLEGAL_TYPE",
23412362
"ILLEGAL_BILLING_GROUP_TYPE",
2363+
"ILLEGAL_BILLING_GROUP_PRICING_PLAN",
23422364
"ILLEGAL_ENDED_BILLINGGROUP",
23432365
"ILLEGAL_TIERING_INPUT",
23442366
"ILLEGAL_OPERATION",

generator/ServiceModels/billingconductor/billingconductor-2021-07-30.docs.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,18 @@
170170
"AttributesList$member": null
171171
}
172172
},
173+
"AttributeValue": {
174+
"base": null,
175+
"refs": {
176+
"AttributeValueList$member": null
177+
}
178+
},
179+
"AttributeValueList": {
180+
"base": null,
181+
"refs": {
182+
"LineItemFilter$AttributeValues": "<p>The values of the line item filter. This specifies the values to filter on.</p>"
183+
}
184+
},
173185
"AttributesList": {
174186
"base": null,
175187
"refs": {

generator/ServiceModels/billingconductor/billingconductor-2021-07-30.normal.json

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -832,6 +832,18 @@
832832
},
833833
"documentation":"<p>The key-value pair that represents the attribute by which the <code>BillingGroupCostReportResults</code> are grouped. For example, if you want a service-level breakdown for Amazon Simple Storage Service (Amazon S3) of the billing group, the attribute will be a key-value pair of <code>\"PRODUCT_NAME\"</code> and <code>\"S3\"</code>.</p>"
834834
},
835+
"AttributeValue":{
836+
"type":"string",
837+
"max":128,
838+
"min":1,
839+
"pattern":"[a-zA-Z0-9]+"
840+
},
841+
"AttributeValueList":{
842+
"type":"list",
843+
"member":{"shape":"AttributeValue"},
844+
"max":1,
845+
"min":0
846+
},
835847
"AttributesList":{
836848
"type":"list",
837849
"member":{"shape":"Attribute"}
@@ -1130,7 +1142,10 @@
11301142
"ComputationRuleEnum":{
11311143
"type":"string",
11321144
"documentation":"<p>The display settings of the custom line item</p>",
1133-
"enum":["CONSOLIDATED"]
1145+
"enum":[
1146+
"ITEMIZED",
1147+
"CONSOLIDATED"
1148+
]
11341149
},
11351150
"ConflictException":{
11361151
"type":"structure",
@@ -1931,8 +1946,7 @@
19311946
"type":"structure",
19321947
"required":[
19331948
"Attribute",
1934-
"MatchOption",
1935-
"Values"
1949+
"MatchOption"
19361950
],
19371951
"members":{
19381952
"Attribute":{
@@ -1946,13 +1960,20 @@
19461960
"Values":{
19471961
"shape":"LineItemFilterValuesList",
19481962
"documentation":"<p>The values of the line item filter. This specifies the values to filter on. Currently, you can only exclude Savings Plans discounts.</p>"
1963+
},
1964+
"AttributeValues":{
1965+
"shape":"AttributeValueList",
1966+
"documentation":"<p>The values of the line item filter. This specifies the values to filter on.</p>"
19491967
}
19501968
},
19511969
"documentation":"<p>A representation of the line item filter for your custom line item. You can use line item filters to include or exclude specific resource values from the billing group's total cost. For example, if you create a custom line item and you want to filter out a value, such as Savings Plans discounts, you can update <code>LineItemFilter</code> to exclude it.</p>"
19521970
},
19531971
"LineItemFilterAttributeName":{
19541972
"type":"string",
1955-
"enum":["LINE_ITEM_TYPE"]
1973+
"enum":[
1974+
"LINE_ITEM_TYPE",
1975+
"SERVICE"
1976+
]
19561977
},
19571978
"LineItemFilterValue":{
19581979
"type":"string",
@@ -2590,7 +2611,10 @@
25902611
"MarginPercentage":{"type":"string"},
25912612
"MatchOption":{
25922613
"type":"string",
2593-
"enum":["NOT_EQUAL"]
2614+
"enum":[
2615+
"NOT_EQUAL",
2616+
"EQUAL"
2617+
]
25942618
},
25952619
"MaxBillingGroupCostReportResults":{
25962620
"type":"integer",
@@ -3504,6 +3528,7 @@
35043528
"ILLEGAL_MODIFIER_PERCENTAGE",
35053529
"ILLEGAL_TYPE",
35063530
"ILLEGAL_BILLING_GROUP_TYPE",
3531+
"ILLEGAL_BILLING_GROUP_PRICING_PLAN",
35073532
"ILLEGAL_ENDED_BILLINGGROUP",
35083533
"ILLEGAL_TIERING_INPUT",
35093534
"ILLEGAL_OPERATION",

sdk/src/Services/BillingConductor/Generated/Model/Internal/MarshallTransformations/LineItemFilterMarshaller.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,17 @@ public void Marshall(LineItemFilter requestObject, JsonMarshallerContext context
5252
context.Writer.WriteStringValue(requestObject.Attribute);
5353
}
5454

55+
if(requestObject.IsSetAttributeValues())
56+
{
57+
context.Writer.WritePropertyName("AttributeValues");
58+
context.Writer.WriteStartArray();
59+
foreach(var requestObjectAttributeValuesListValue in requestObject.AttributeValues)
60+
{
61+
context.Writer.WriteStringValue(requestObjectAttributeValuesListValue);
62+
}
63+
context.Writer.WriteEndArray();
64+
}
65+
5566
if(requestObject.IsSetMatchOption())
5667
{
5768
context.Writer.WritePropertyName("MatchOption");

sdk/src/Services/BillingConductor/Generated/Model/Internal/MarshallTransformations/LineItemFilterUnmarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ public LineItemFilter Unmarshall(JsonUnmarshallerContext context, ref StreamingU
6262
unmarshalledObject.Attribute = unmarshaller.Unmarshall(context, ref reader);
6363
continue;
6464
}
65+
if (context.TestExpression("AttributeValues", targetDepth))
66+
{
67+
var unmarshaller = new JsonListUnmarshaller<string, StringUnmarshaller>(StringUnmarshaller.Instance);
68+
unmarshalledObject.AttributeValues = unmarshaller.Unmarshall(context, ref reader);
69+
continue;
70+
}
6571
if (context.TestExpression("MatchOption", targetDepth))
6672
{
6773
var unmarshaller = StringUnmarshaller.Instance;

sdk/src/Services/BillingConductor/Generated/Model/LineItemFilter.cs

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ namespace Amazon.BillingConductor.Model
3939
public partial class LineItemFilter
4040
{
4141
private LineItemFilterAttributeName _attribute;
42+
private List<string> _attributeValues = AWSConfigs.InitializeCollections ? new List<string>() : null;
4243
private MatchOption _matchOption;
4344
private List<string> _values = AWSConfigs.InitializeCollections ? new List<string>() : null;
4445

@@ -62,6 +63,30 @@ internal bool IsSetAttribute()
6263
return this._attribute != null;
6364
}
6465

66+
/// <summary>
67+
/// Gets and sets the property AttributeValues.
68+
/// <para>
69+
/// The values of the line item filter. This specifies the values to filter on.
70+
/// </para>
71+
/// <para />
72+
/// Starting with version 4 of the SDK this property will default to null. If no data for this property is returned
73+
/// from the service the property will also be null. This was changed to improve performance and allow the SDK and caller
74+
/// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
75+
/// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
76+
/// </summary>
77+
[AWSProperty(Min=0, Max=1)]
78+
public List<string> AttributeValues
79+
{
80+
get { return this._attributeValues; }
81+
set { this._attributeValues = value; }
82+
}
83+
84+
// Check to see if AttributeValues property is set
85+
internal bool IsSetAttributeValues()
86+
{
87+
return this._attributeValues != null && (this._attributeValues.Count > 0 || !AWSConfigs.InitializeCollections);
88+
}
89+
6590
/// <summary>
6691
/// Gets and sets the property MatchOption.
6792
/// <para>
@@ -94,7 +119,7 @@ internal bool IsSetMatchOption()
94119
/// to distinguish between a property not set or a property being empty to clear out a value. To retain the previous
95120
/// SDK behavior set the AWSConfigs.InitializeCollections static property to true.
96121
/// </summary>
97-
[AWSProperty(Required=true, Min=0, Max=1)]
122+
[AWSProperty(Min=0, Max=1)]
98123
public List<string> Values
99124
{
100125
get { return this._values; }

sdk/src/Services/BillingConductor/Generated/ServiceEnumerations.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,10 @@ public class ComputationRuleEnum : ConstantClass
200200
/// Constant CONSOLIDATED for ComputationRuleEnum
201201
/// </summary>
202202
public static readonly ComputationRuleEnum CONSOLIDATED = new ComputationRuleEnum("CONSOLIDATED");
203+
/// <summary>
204+
/// Constant ITEMIZED for ComputationRuleEnum
205+
/// </summary>
206+
public static readonly ComputationRuleEnum ITEMIZED = new ComputationRuleEnum("ITEMIZED");
203207

204208
/// <summary>
205209
/// This constant constructor does not need to be called if the constant
@@ -508,6 +512,10 @@ public class LineItemFilterAttributeName : ConstantClass
508512
/// Constant LINE_ITEM_TYPE for LineItemFilterAttributeName
509513
/// </summary>
510514
public static readonly LineItemFilterAttributeName LINE_ITEM_TYPE = new LineItemFilterAttributeName("LINE_ITEM_TYPE");
515+
/// <summary>
516+
/// Constant SERVICE for LineItemFilterAttributeName
517+
/// </summary>
518+
public static readonly LineItemFilterAttributeName SERVICE = new LineItemFilterAttributeName("SERVICE");
511519

512520
/// <summary>
513521
/// This constant constructor does not need to be called if the constant
@@ -596,6 +604,10 @@ public static implicit operator LineItemFilterValue(string value)
596604
public class MatchOption : ConstantClass
597605
{
598606

607+
/// <summary>
608+
/// Constant EQUAL for MatchOption
609+
/// </summary>
610+
public static readonly MatchOption EQUAL = new MatchOption("EQUAL");
599611
/// <summary>
600612
/// Constant NOT_EQUAL for MatchOption
601613
/// </summary>
@@ -849,6 +861,10 @@ public class ValidationExceptionReason : ConstantClass
849861
/// </summary>
850862
public static readonly ValidationExceptionReason ILLEGAL_BILLING_ENTITY = new ValidationExceptionReason("ILLEGAL_BILLING_ENTITY");
851863
/// <summary>
864+
/// Constant ILLEGAL_BILLING_GROUP_PRICING_PLAN for ValidationExceptionReason
865+
/// </summary>
866+
public static readonly ValidationExceptionReason ILLEGAL_BILLING_GROUP_PRICING_PLAN = new ValidationExceptionReason("ILLEGAL_BILLING_GROUP_PRICING_PLAN");
867+
/// <summary>
852868
/// Constant ILLEGAL_BILLING_GROUP_TYPE for ValidationExceptionReason
853869
/// </summary>
854870
public static readonly ValidationExceptionReason ILLEGAL_BILLING_GROUP_TYPE = new ValidationExceptionReason("ILLEGAL_BILLING_GROUP_TYPE");

0 commit comments

Comments
 (0)