File type_campaign.go
has 804 lines of code (exceeds 500 allowed). Consider refactoring. Open
package pinpoint
import (
SDK "github.com/aws/aws-sdk-go-v2/service/pinpoint"
"github.com/evalphobia/aws-sdk-go-v2-wrapper/private/pointers"
Function newCampaignResponse
has 68 lines of code (exceeds 50 allowed). Consider refactoring. Open
func newCampaignResponse(o *SDK.CampaignResponse) CampaignResponse {
result := CampaignResponse{}
if o == nil {
return result
}
Similar blocks of code found in 3 locations. Consider refactoring. Open
func (r CampaignEmailMessage) ToSDK() *SDK.CampaignEmailMessage {
o := SDK.CampaignEmailMessage{}
if r.Body != "" {
o.Body = pointers.String(r.Body)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 186.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 3 locations. Consider refactoring. Open
func (r CampaignLimits) ToSDK() *SDK.CampaignLimits {
o := SDK.CampaignLimits{}
if r.Daily != 0 {
o.Daily = pointers.Long64(r.Daily)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 186.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
func newCampaignLimits(o *SDK.CampaignLimits) CampaignLimits {
result := CampaignLimits{}
if o == nil {
return result
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 167.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 4 locations. Consider refactoring. Open
func newCampaignEmailMessage(o *SDK.CampaignEmailMessage) CampaignEmailMessage {
result := CampaignEmailMessage{}
if o == nil {
return result
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 167.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
func (r CampaignHook) ToSDK() *SDK.CampaignHook {
o := SDK.CampaignHook{}
if r.LambdaFunctionName != "" {
o.LambdaFunctionName = pointers.String(r.LambdaFunctionName)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 137.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
func (r CampaignSMSMessage) ToSDK() *SDK.CampaignSmsMessage {
o := SDK.CampaignSmsMessage{}
if r.Body != "" {
o.Body = pointers.String(r.Body)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 137.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
func newCampaignHook(o *SDK.CampaignHook) CampaignHook {
result := CampaignHook{}
if o == nil {
return result
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 126.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
func newCampaignSMSMessage(o *SDK.CampaignSmsMessage) CampaignSMSMessage {
result := CampaignSMSMessage{}
if o == nil {
return result
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 126.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
func (r Template) ToSDK() *SDK.Template {
o := SDK.Template{}
if r.Name != "" {
o.Name = pointers.String(r.Name)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 116.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 2 locations. Consider refactoring. Open
func (r QuietTime) ToSDK() *SDK.QuietTime {
o := SDK.QuietTime{}
if r.End != "" {
o.End = pointers.String(r.End)
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 116.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 7 locations. Consider refactoring. Open
func newTemplate(o *SDK.Template) Template {
result := Template{}
if o == nil {
return result
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 109.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
Similar blocks of code found in 7 locations. Consider refactoring. Open
func newQuietTime(o *SDK.QuietTime) QuietTime {
result := QuietTime{}
if o == nil {
return result
}
- Read upRead up
Duplicated Code
Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:
Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.
When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).
Tuning
This issue has a mass of 109.
We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.
The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.
If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.
See codeclimate-duplication
's documentation for more information about tuning the mass threshold in your .codeclimate.yml
.
Refactorings
- Extract Method
- Extract Class
- Form Template Method
- Introduce Null Object
- Pull Up Method
- Pull Up Field
- Substitute Algorithm
Further Reading
- Don't Repeat Yourself on the C2 Wiki
- Duplicated Code on SourceMaking
- Refactoring: Improving the Design of Existing Code by Martin Fowler. Duplicated Code, p76
exported type CampaignHook should have comment or be unexported Open
type CampaignHook struct {
- Exclude checks
exported type CampaignEmailMessage should have comment or be unexported Open
type CampaignEmailMessage struct {
- Exclude checks
exported method AttributeDimension.ToSDK should have comment or be unexported Open
func (r AttributeDimension) ToSDK() SDK.AttributeDimension {
- Exclude checks
exported method CampaignLimits.ToSDK should have comment or be unexported Open
func (r CampaignLimits) ToSDK() *SDK.CampaignLimits {
- Exclude checks
exported type CampaignCustomMessage should have comment or be unexported Open
type CampaignCustomMessage struct {
- Exclude checks
exported method CampaignEventFilter.ToSDK should have comment or be unexported Open
func (r CampaignEventFilter) ToSDK() *SDK.CampaignEventFilter {
- Exclude checks
exported type CampaignEventFilter should have comment or be unexported Open
type CampaignEventFilter struct {
- Exclude checks
exported type CampaignLimits should have comment or be unexported Open
type CampaignLimits struct {
- Exclude checks
exported type AttributeDimension should have comment or be unexported Open
type AttributeDimension struct {
- Exclude checks
exported method CampaignCustomMessage.ToSDK should have comment or be unexported Open
func (r CampaignCustomMessage) ToSDK() *SDK.CampaignCustomMessage {
- Exclude checks
exported method CampaignHook.ToSDK should have comment or be unexported Open
func (r CampaignHook) ToSDK() *SDK.CampaignHook {
- Exclude checks
exported type CampaignResponse should have comment or be unexported Open
type CampaignResponse struct {
- Exclude checks
exported method CampaignEmailMessage.ToSDK should have comment or be unexported Open
func (r CampaignEmailMessage) ToSDK() *SDK.CampaignEmailMessage {
- Exclude checks
exported type CustomDeliveryConfiguration should have comment or be unexported Open
type CustomDeliveryConfiguration struct {
- Exclude checks
exported type TemplateConfiguration should have comment or be unexported Open
type TemplateConfiguration struct {
- Exclude checks
exported method CustomDeliveryConfiguration.ToSDK should have comment or be unexported Open
func (r CustomDeliveryConfiguration) ToSDK() *SDK.CustomDeliveryConfiguration {
- Exclude checks
exported method MetricDimension.ToSDK should have comment or be unexported Open
func (r MetricDimension) ToSDK() SDK.MetricDimension {
- Exclude checks
exported type Template should have comment or be unexported Open
type Template struct {
- Exclude checks
exported method WriteCampaignRequest.ToSDK should have comment or be unexported Open
func (r WriteCampaignRequest) ToSDK() *SDK.WriteCampaignRequest {
- Exclude checks
exported type WriteCampaignRequest should have comment or be unexported Open
type WriteCampaignRequest struct {
- Exclude checks
exported method MessageConfiguration.ToSDK should have comment or be unexported Open
func (r MessageConfiguration) ToSDK() *SDK.MessageConfiguration {
- Exclude checks
exported method WriteTreatmentResource.ToSDK should have comment or be unexported Open
func (r WriteTreatmentResource) ToSDK() SDK.WriteTreatmentResource {
- Exclude checks
exported type QuietTime should have comment or be unexported Open
type QuietTime struct {
- Exclude checks
exported method CampaignSMSMessage.ToSDK should have comment or be unexported Open
func (r CampaignSMSMessage) ToSDK() *SDK.CampaignSmsMessage {
- Exclude checks
exported method Template.ToSDK should have comment or be unexported Open
func (r Template) ToSDK() *SDK.Template {
- Exclude checks
exported type CampaignSMSMessage should have comment or be unexported Open
type CampaignSMSMessage struct {
- Exclude checks
exported method Message.ToSDK should have comment or be unexported Open
func (r Message) ToSDK() *SDK.Message {
- Exclude checks
exported type MessageConfiguration should have comment or be unexported Open
type MessageConfiguration struct {
- Exclude checks
exported method SetDimension.ToSDK should have comment or be unexported Open
func (r SetDimension) ToSDK() *SDK.SetDimension {
- Exclude checks
exported method TemplateConfiguration.ToSDK should have comment or be unexported Open
func (r TemplateConfiguration) ToSDK() *SDK.TemplateConfiguration {
- Exclude checks
exported type Schedule should have comment or be unexported Open
type Schedule struct {
- Exclude checks
exported type SetDimension should have comment or be unexported Open
type SetDimension struct {
- Exclude checks
exported type WriteTreatmentResource should have comment or be unexported Open
type WriteTreatmentResource struct {
- Exclude checks
exported type Message should have comment or be unexported Open
type Message struct {
- Exclude checks
exported type MetricDimension should have comment or be unexported Open
type MetricDimension struct {
- Exclude checks
exported method Schedule.ToSDK should have comment or be unexported Open
func (r Schedule) ToSDK() *SDK.Schedule {
- Exclude checks
exported type TreatmentResource should have comment or be unexported Open
type TreatmentResource struct {
- Exclude checks
exported method QuietTime.ToSDK should have comment or be unexported Open
func (r QuietTime) ToSDK() *SDK.QuietTime {
- Exclude checks
exported method EventDimensions.ToSDK should have comment or be unexported Open
func (r EventDimensions) ToSDK() *SDK.EventDimensions {
- Exclude checks
exported type EventDimensions should have comment or be unexported Open
type EventDimensions struct {
- Exclude checks