-
Notifications
You must be signed in to change notification settings - Fork 55
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
Update AWS v2 API docs #2806
base: master
Are you sure you want to change the base?
Update AWS v2 API docs #2806
Conversation
@@ -41,6 +49,14 @@ func NewAWSMetricsConfig() *AWSMetricsConfig { | |||
// but it doesn't guarantee that properties required by API are set. | |||
func NewAWSMetricsConfigWithDefaults() *AWSMetricsConfig { | |||
this := AWSMetricsConfig{} | |||
var automuteEnabled bool = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 Code Quality Violation
var automuteEnabled bool = true | |
var automuteEnabled = true |
redundant type declaration (...read more)
In Go, it is considered good practice to avoid declaring the type when it is obvious or when the type can be inferred from the assignment. This is known as type inference, and it offers several benefits:
- Readability: By omitting the explicit type declaration, the code becomes more concise and easier to read. Redundant type declarations can clutter the code and introduce unnecessary noise. When the type is obvious from the assigned value, omitting the type declaration can improve code readability and make it more expressive.
- Flexibility and maintainability: Using type inference allows for easier changes to the underlying type without manually updating every instance where it is declared. If the type needs to be changed in the future, you only need to modify the assignment, and Go's type inference mechanism will handle the rest. This reduces the maintenance effort required and improves code maintainability.
- Clean code appearance: Omitting the type declaration when it is obvious results in cleaner code syntax. Code that is free from excessive explicit type declarations tends to look more elegant and consistent. It minimizes redundancy and focuses on the essential logic, contributing to a cleaner and more streamlined codebase.
- Compatibility: Go's type inference mechanism ensures compatibility with future changes to the type of the assigned value. If the assigned value is changed to a type-compatible value, the code will continue to compile and run without any modifications. This allows for flexibility in your code while maintaining correctness.
That being said, it is important to strike a balance and avoid excessive use of type inference. Clear and explicit type declarations are still valuable when they enhance code clarity, such as when documenting or expressing the intent of the code. It is essential to find the right balance between brevity and clarity in your codebase.
By utilizing Go's type inference mechanism and avoiding explicit type declarations when the type is obvious, you can achieve more readable, maintainable, and concise code that adheres to Go's idiomatic style.
@@ -33,6 +37,10 @@ func NewAWSResourcesConfig() *AWSResourcesConfig { | |||
// but it doesn't guarantee that properties required by API are set. | |||
func NewAWSResourcesConfigWithDefaults() *AWSResourcesConfig { | |||
this := AWSResourcesConfig{} | |||
var cloudSecurityPostureManagementCollection bool = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 Code Quality Violation
var cloudSecurityPostureManagementCollection bool = false | |
var cloudSecurityPostureManagementCollection = false |
redundant type declaration (...read more)
In Go, it is considered good practice to avoid declaring the type when it is obvious or when the type can be inferred from the assignment. This is known as type inference, and it offers several benefits:
- Readability: By omitting the explicit type declaration, the code becomes more concise and easier to read. Redundant type declarations can clutter the code and introduce unnecessary noise. When the type is obvious from the assigned value, omitting the type declaration can improve code readability and make it more expressive.
- Flexibility and maintainability: Using type inference allows for easier changes to the underlying type without manually updating every instance where it is declared. If the type needs to be changed in the future, you only need to modify the assignment, and Go's type inference mechanism will handle the rest. This reduces the maintenance effort required and improves code maintainability.
- Clean code appearance: Omitting the type declaration when it is obvious results in cleaner code syntax. Code that is free from excessive explicit type declarations tends to look more elegant and consistent. It minimizes redundancy and focuses on the essential logic, contributing to a cleaner and more streamlined codebase.
- Compatibility: Go's type inference mechanism ensures compatibility with future changes to the type of the assigned value. If the assigned value is changed to a type-compatible value, the code will continue to compile and run without any modifications. This allows for flexibility in your code while maintaining correctness.
That being said, it is important to strike a balance and avoid excessive use of type inference. Clear and explicit type declarations are still valuable when they enhance code clarity, such as when documenting or expressing the intent of the code. It is essential to find the right balance between brevity and clarity in your codebase.
By utilizing Go's type inference mechanism and avoiding explicit type declarations when the type is obvious, you can achieve more readable, maintainable, and concise code that adheres to Go's idiomatic style.
@@ -41,6 +49,14 @@ | |||
// but it doesn't guarantee that properties required by API are set. | |||
func NewAWSMetricsConfigWithDefaults() *AWSMetricsConfig { | |||
this := AWSMetricsConfig{} | |||
var automuteEnabled bool = true | |||
this.AutomuteEnabled = &automuteEnabled | |||
var collectCloudwatchAlarms bool = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 Code Quality Violation
var collectCloudwatchAlarms bool = false | |
var collectCloudwatchAlarms = false |
redundant type declaration (...read more)
In Go, it is considered good practice to avoid declaring the type when it is obvious or when the type can be inferred from the assignment. This is known as type inference, and it offers several benefits:
- Readability: By omitting the explicit type declaration, the code becomes more concise and easier to read. Redundant type declarations can clutter the code and introduce unnecessary noise. When the type is obvious from the assigned value, omitting the type declaration can improve code readability and make it more expressive.
- Flexibility and maintainability: Using type inference allows for easier changes to the underlying type without manually updating every instance where it is declared. If the type needs to be changed in the future, you only need to modify the assignment, and Go's type inference mechanism will handle the rest. This reduces the maintenance effort required and improves code maintainability.
- Clean code appearance: Omitting the type declaration when it is obvious results in cleaner code syntax. Code that is free from excessive explicit type declarations tends to look more elegant and consistent. It minimizes redundancy and focuses on the essential logic, contributing to a cleaner and more streamlined codebase.
- Compatibility: Go's type inference mechanism ensures compatibility with future changes to the type of the assigned value. If the assigned value is changed to a type-compatible value, the code will continue to compile and run without any modifications. This allows for flexibility in your code while maintaining correctness.
That being said, it is important to strike a balance and avoid excessive use of type inference. Clear and explicit type declarations are still valuable when they enhance code clarity, such as when documenting or expressing the intent of the code. It is essential to find the right balance between brevity and clarity in your codebase.
By utilizing Go's type inference mechanism and avoiding explicit type declarations when the type is obvious, you can achieve more readable, maintainable, and concise code that adheres to Go's idiomatic style.
this.CollectCloudwatchAlarms = &collectCloudwatchAlarms | ||
var collectCustomMetrics bool = false | ||
this.CollectCustomMetrics = &collectCustomMetrics | ||
var enabled bool = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 Code Quality Violation
var enabled bool = true | |
var enabled = true |
redundant type declaration (...read more)
In Go, it is considered good practice to avoid declaring the type when it is obvious or when the type can be inferred from the assignment. This is known as type inference, and it offers several benefits:
- Readability: By omitting the explicit type declaration, the code becomes more concise and easier to read. Redundant type declarations can clutter the code and introduce unnecessary noise. When the type is obvious from the assigned value, omitting the type declaration can improve code readability and make it more expressive.
- Flexibility and maintainability: Using type inference allows for easier changes to the underlying type without manually updating every instance where it is declared. If the type needs to be changed in the future, you only need to modify the assignment, and Go's type inference mechanism will handle the rest. This reduces the maintenance effort required and improves code maintainability.
- Clean code appearance: Omitting the type declaration when it is obvious results in cleaner code syntax. Code that is free from excessive explicit type declarations tends to look more elegant and consistent. It minimizes redundancy and focuses on the essential logic, contributing to a cleaner and more streamlined codebase.
- Compatibility: Go's type inference mechanism ensures compatibility with future changes to the type of the assigned value. If the assigned value is changed to a type-compatible value, the code will continue to compile and run without any modifications. This allows for flexibility in your code while maintaining correctness.
That being said, it is important to strike a balance and avoid excessive use of type inference. Clear and explicit type declarations are still valuable when they enhance code clarity, such as when documenting or expressing the intent of the code. It is essential to find the right balance between brevity and clarity in your codebase.
By utilizing Go's type inference mechanism and avoiding explicit type declarations when the type is obvious, you can achieve more readable, maintainable, and concise code that adheres to Go's idiomatic style.
@@ -25,6 +25,10 @@ | |||
// will change when the set of required properties is changed. | |||
func NewAWSResourcesConfig() *AWSResourcesConfig { | |||
this := AWSResourcesConfig{} | |||
var cloudSecurityPostureManagementCollection bool = false | |||
this.CloudSecurityPostureManagementCollection = &cloudSecurityPostureManagementCollection | |||
var extendedCollection bool = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 Code Quality Violation
var extendedCollection bool = true | |
var extendedCollection = true |
redundant type declaration (...read more)
In Go, it is considered good practice to avoid declaring the type when it is obvious or when the type can be inferred from the assignment. This is known as type inference, and it offers several benefits:
- Readability: By omitting the explicit type declaration, the code becomes more concise and easier to read. Redundant type declarations can clutter the code and introduce unnecessary noise. When the type is obvious from the assigned value, omitting the type declaration can improve code readability and make it more expressive.
- Flexibility and maintainability: Using type inference allows for easier changes to the underlying type without manually updating every instance where it is declared. If the type needs to be changed in the future, you only need to modify the assignment, and Go's type inference mechanism will handle the rest. This reduces the maintenance effort required and improves code maintainability.
- Clean code appearance: Omitting the type declaration when it is obvious results in cleaner code syntax. Code that is free from excessive explicit type declarations tends to look more elegant and consistent. It minimizes redundancy and focuses on the essential logic, contributing to a cleaner and more streamlined codebase.
- Compatibility: Go's type inference mechanism ensures compatibility with future changes to the type of the assigned value. If the assigned value is changed to a type-compatible value, the code will continue to compile and run without any modifications. This allows for flexibility in your code while maintaining correctness.
That being said, it is important to strike a balance and avoid excessive use of type inference. Clear and explicit type declarations are still valuable when they enhance code clarity, such as when documenting or expressing the intent of the code. It is essential to find the right balance between brevity and clarity in your codebase.
By utilizing Go's type inference mechanism and avoiding explicit type declarations when the type is obvious, you can achieve more readable, maintainable, and concise code that adheres to Go's idiomatic style.
@@ -34,6 +34,8 @@ func NewAWSRegionsIncludeAll(includeAll bool) *AWSRegionsIncludeAll { | |||
// but it doesn't guarantee that properties required by API are set. | |||
func NewAWSRegionsIncludeAllWithDefaults() *AWSRegionsIncludeAll { | |||
this := AWSRegionsIncludeAll{} | |||
var includeAll bool = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 Code Quality Violation
var includeAll bool = true | |
var includeAll = true |
redundant type declaration (...read more)
In Go, it is considered good practice to avoid declaring the type when it is obvious or when the type can be inferred from the assignment. This is known as type inference, and it offers several benefits:
- Readability: By omitting the explicit type declaration, the code becomes more concise and easier to read. Redundant type declarations can clutter the code and introduce unnecessary noise. When the type is obvious from the assigned value, omitting the type declaration can improve code readability and make it more expressive.
- Flexibility and maintainability: Using type inference allows for easier changes to the underlying type without manually updating every instance where it is declared. If the type needs to be changed in the future, you only need to modify the assignment, and Go's type inference mechanism will handle the rest. This reduces the maintenance effort required and improves code maintainability.
- Clean code appearance: Omitting the type declaration when it is obvious results in cleaner code syntax. Code that is free from excessive explicit type declarations tends to look more elegant and consistent. It minimizes redundancy and focuses on the essential logic, contributing to a cleaner and more streamlined codebase.
- Compatibility: Go's type inference mechanism ensures compatibility with future changes to the type of the assigned value. If the assigned value is changed to a type-compatible value, the code will continue to compile and run without any modifications. This allows for flexibility in your code while maintaining correctness.
That being said, it is important to strike a balance and avoid excessive use of type inference. Clear and explicit type declarations are still valuable when they enhance code clarity, such as when documenting or expressing the intent of the code. It is essential to find the right balance between brevity and clarity in your codebase.
By utilizing Go's type inference mechanism and avoiding explicit type declarations when the type is obvious, you can achieve more readable, maintainable, and concise code that adheres to Go's idiomatic style.
this.AutomuteEnabled = &automuteEnabled | ||
var collectCloudwatchAlarms bool = false | ||
this.CollectCloudwatchAlarms = &collectCloudwatchAlarms | ||
var collectCustomMetrics bool = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔵 Code Quality Violation
var collectCustomMetrics bool = false | |
var collectCustomMetrics = false |
redundant type declaration (...read more)
In Go, it is considered good practice to avoid declaring the type when it is obvious or when the type can be inferred from the assignment. This is known as type inference, and it offers several benefits:
- Readability: By omitting the explicit type declaration, the code becomes more concise and easier to read. Redundant type declarations can clutter the code and introduce unnecessary noise. When the type is obvious from the assigned value, omitting the type declaration can improve code readability and make it more expressive.
- Flexibility and maintainability: Using type inference allows for easier changes to the underlying type without manually updating every instance where it is declared. If the type needs to be changed in the future, you only need to modify the assignment, and Go's type inference mechanism will handle the rest. This reduces the maintenance effort required and improves code maintainability.
- Clean code appearance: Omitting the type declaration when it is obvious results in cleaner code syntax. Code that is free from excessive explicit type declarations tends to look more elegant and consistent. It minimizes redundancy and focuses on the essential logic, contributing to a cleaner and more streamlined codebase.
- Compatibility: Go's type inference mechanism ensures compatibility with future changes to the type of the assigned value. If the assigned value is changed to a type-compatible value, the code will continue to compile and run without any modifications. This allows for flexibility in your code while maintaining correctness.
That being said, it is important to strike a balance and avoid excessive use of type inference. Clear and explicit type declarations are still valuable when they enhance code clarity, such as when documenting or expressing the intent of the code. It is essential to find the right balance between brevity and clarity in your codebase.
By utilizing Go's type inference mechanism and avoiding explicit type declarations when the type is obvious, you can achieve more readable, maintainable, and concise code that adheres to Go's idiomatic style.
3f13b6b
to
46eda3a
Compare
46eda3a
to
c3604a2
Compare
5387169
to
08cce18
Compare
08cce18
to
c9c81c4
Compare
See DataDog/datadog-api-spec#3329
Test branch datadog-api-spec/test/katie.mckew/awscustexp-113-improve-v2-aws-docs