Skip to content

Commit

Permalink
Merge pull request #93 from opsgenie/og-pun-fix-policy-alert-description
Browse files Browse the repository at this point in the history
Change Json field name to description in AlertPolicy
  • Loading branch information
prakhar-mudaiya authored Jan 5, 2022
2 parents f67f1e1 + 5b41854 commit b14b16d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions policy/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type CreateAlertPolicyRequest struct {
Message string `json:"message,omitempty"`
Continue *bool `json:"continue,omitempty"`
Alias string `json:"alias,omitempty"`
AlertDescription string `json:"alertDescription,omitempty"`
AlertDescription string `json:"description,omitempty"`
Entity string `json:"entity,omitempty"`
Source string `json:"source,omitempty"`
IgnoreOriginalDetails *bool `json:"ignoreOriginalDetails,omitempty"`
Expand Down Expand Up @@ -257,9 +257,9 @@ func (r *UpdateAlertPolicyRequest) ResourcePath() string {
}

func (r *UpdateAlertPolicyRequest) RequestParams() map[string]string {
params := make(map[string]string)
params["teamId"] = r.TeamId
return params
params := make(map[string]string)
params["teamId"] = r.TeamId
return params
}

func (r *UpdateAlertPolicyRequest) Method() string {
Expand Down
12 changes: 6 additions & 6 deletions policy/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type GetAlertPolicyResult struct {
Message string `json:"message"`
Continue bool `json:"continue,omitempty"`
Alias string `json:"alias,omitempty"`
AlertDescription string `json:"alertDescription,omitempty"`
AlertDescription string `json:"description,omitempty"`
Entity string `json:"entity,omitempty"`
Source string `json:"source,omitempty"`
IgnoreOriginalDetails bool `json:"ignoreOriginalDetails,omitempty"`
Expand All @@ -36,11 +36,11 @@ type GetAlertPolicyResult struct {
type GetNotificationPolicyResult struct {
client.ResultMetadata
MainFields
AutoRestartAction *AutoRestartAction `json:"autoRestartAction,omitempty"`
AutoCloseAction *AutoCloseAction `json:"autoCloseAction,omitempty"`
DeDuplicationAction *DeDuplicationAction `json:"deduplicationAction,omitempty"`
DelayAction *DelayAction `json:"delayAction,omitempty"`
Suppress bool `json:"suppress,omitempty"`
AutoRestartAction *AutoRestartAction `json:"autoRestartAction,omitempty"`
AutoCloseAction *AutoCloseAction `json:"autoCloseAction,omitempty"`
DeDuplicationAction *DeDuplicationAction `json:"deduplicationAction,omitempty"`
DelayAction *DelayAction `json:"delayAction,omitempty"`
Suppress bool `json:"suppress,omitempty"`
}

type PolicyResult struct {
Expand Down

0 comments on commit b14b16d

Please sign in to comment.