Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark num_finite_buckets required for cloud logging metric bucket_options #8780

Merged
30 changes: 6 additions & 24 deletions mmv1/products/logging/Metric.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,28 +206,19 @@ properties:
properties:
- !ruby/object:Api::Type::Integer
name: numFiniteBuckets
at_least_one_of:
- bucket_options.0.linear_buckets.0.num_finite_buckets
- bucket_options.0.linear_buckets.0.width
- bucket_options.0.linear_buckets.0.offset
description: |
Must be greater than 0.
required: true
- !ruby/object:Api::Type::Double
name: width
at_least_one_of:
- bucket_options.0.linear_buckets.0.num_finite_buckets
- bucket_options.0.linear_buckets.0.width
- bucket_options.0.linear_buckets.0.offset
description: |
Must be greater than 0.
required: true
- !ruby/object:Api::Type::Double
name: offset
at_least_one_of:
- bucket_options.0.linear_buckets.0.num_finite_buckets
- bucket_options.0.linear_buckets.0.width
- bucket_options.0.linear_buckets.0.offset
description: |
Lower bound of the first bucket.
required: true
- !ruby/object:Api::Type::NestedObject
name: exponentialBuckets
at_least_one_of:
Expand All @@ -240,28 +231,19 @@ properties:
properties:
- !ruby/object:Api::Type::Integer
name: numFiniteBuckets
at_least_one_of:
- bucket_options.0.exponential_buckets.0.num_finite_buckets
- bucket_options.0.exponential_buckets.0.growth_factor
- bucket_options.0.exponential_buckets.0.scale
description: |
Must be greater than 0.
required: true
- !ruby/object:Api::Type::Double
name: growthFactor
at_least_one_of:
- bucket_options.0.exponential_buckets.0.num_finite_buckets
- bucket_options.0.exponential_buckets.0.growth_factor
- bucket_options.0.exponential_buckets.0.scale
description: |
Must be greater than 1.
required: true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just making sure, are all of these fields required? Or only numFiniteBuckets?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. Thanks!

- !ruby/object:Api::Type::Double
name: scale
at_least_one_of:
- bucket_options.0.exponential_buckets.0.num_finite_buckets
- bucket_options.0.exponential_buckets.0.growth_factor
- bucket_options.0.exponential_buckets.0.scale
description: |
Must be greater than 0.
required: true
- !ruby/object:Api::Type::NestedObject
name: explicitBuckets
at_least_one_of:
Expand Down