Skip to content

Commit

Permalink
Updating based on f2141820
Browse files Browse the repository at this point in the history
  • Loading branch information
hc-github-team-tf-azure committed Jun 21, 2024
1 parent dede1d3 commit cb53dfb
Show file tree
Hide file tree
Showing 4,666 changed files with 46 additions and 139,543 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
package domainservices

import (
"time"

"github.com/hashicorp/go-azure-helpers/lang/dates"
)

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

Expand All @@ -18,27 +12,3 @@ type HealthAlert struct {
ResolutionUri *string `json:"resolutionUri,omitempty"`
Severity *string `json:"severity,omitempty"`
}

func (o *HealthAlert) GetLastDetectedAsTime() (*time.Time, error) {
if o.LastDetected == nil {
return nil, nil
}
return dates.ParseAsFormat(o.LastDetected, "2006-01-02T15:04:05Z07:00")
}

func (o *HealthAlert) SetLastDetectedAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.LastDetected = &formatted
}

func (o *HealthAlert) GetRaisedAsTime() (*time.Time, error) {
if o.Raised == nil {
return nil, nil
}
return dates.ParseAsFormat(o.Raised, "2006-01-02T15:04:05Z07:00")
}

func (o *HealthAlert) SetRaisedAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.Raised = &formatted
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
package domainservices

import (
"time"

"github.com/hashicorp/go-azure-helpers/lang/dates"
)

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

Expand All @@ -18,15 +12,3 @@ type LdapsSettings struct {
PfxCertificatePassword *string `json:"pfxCertificatePassword,omitempty"`
PublicCertificate *string `json:"publicCertificate,omitempty"`
}

func (o *LdapsSettings) GetCertificateNotAfterAsTime() (*time.Time, error) {
if o.CertificateNotAfter == nil {
return nil, nil
}
return dates.ParseAsFormat(o.CertificateNotAfter, "2006-01-02T15:04:05Z07:00")
}

func (o *LdapsSettings) SetCertificateNotAfterAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.CertificateNotAfter = &formatted
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
package getrecommendations

import (
"time"

"github.com/hashicorp/go-azure-helpers/lang/dates"
)

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

Expand All @@ -29,15 +23,3 @@ type RecommendationProperties struct {
ShortDescription *ShortDescription `json:"shortDescription,omitempty"`
SuppressionIds *[]string `json:"suppressionIds,omitempty"`
}

func (o *RecommendationProperties) GetLastUpdatedAsTime() (*time.Time, error) {
if o.LastUpdated == nil {
return nil, nil
}
return dates.ParseAsFormat(o.LastUpdated, "2006-01-02T15:04:05Z07:00")
}

func (o *RecommendationProperties) SetLastUpdatedAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.LastUpdated = &formatted
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
package suppressions

import (
"time"

"github.com/hashicorp/go-azure-helpers/lang/dates"
)

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

Expand All @@ -14,15 +8,3 @@ type SuppressionProperties struct {
SuppressionId *string `json:"suppressionId,omitempty"`
Ttl *string `json:"ttl,omitempty"`
}

func (o *SuppressionProperties) GetExpirationTimeStampAsTime() (*time.Time, error) {
if o.ExpirationTimeStamp == nil {
return nil, nil
}
return dates.ParseAsFormat(o.ExpirationTimeStamp, "2006-01-02T15:04:05Z07:00")
}

func (o *SuppressionProperties) SetExpirationTimeStampAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.ExpirationTimeStamp = &formatted
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
package getrecommendations

import (
"time"

"github.com/hashicorp/go-azure-helpers/lang/dates"
)

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

Expand All @@ -30,15 +24,3 @@ type RecommendationProperties struct {
ShortDescription *ShortDescription `json:"shortDescription,omitempty"`
SuppressionIds *[]string `json:"suppressionIds,omitempty"`
}

func (o *RecommendationProperties) GetLastUpdatedAsTime() (*time.Time, error) {
if o.LastUpdated == nil {
return nil, nil
}
return dates.ParseAsFormat(o.LastUpdated, "2006-01-02T15:04:05Z07:00")
}

func (o *RecommendationProperties) SetLastUpdatedAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.LastUpdated = &formatted
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
package prediction

import (
"time"

"github.com/hashicorp/go-azure-helpers/lang/dates"
)

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

Expand All @@ -18,15 +12,3 @@ type PredictionResponseProperties struct {
PredictionType *PredictionType `json:"predictionType,omitempty"`
ShortDescription *ShortDescription `json:"shortDescription,omitempty"`
}

func (o *PredictionResponseProperties) GetLastUpdatedAsTime() (*time.Time, error) {
if o.LastUpdated == nil {
return nil, nil
}
return dates.ParseAsFormat(o.LastUpdated, "2006-01-02T15:04:05Z07:00")
}

func (o *PredictionResponseProperties) SetLastUpdatedAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.LastUpdated = &formatted
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
package suppressions

import (
"time"

"github.com/hashicorp/go-azure-helpers/lang/dates"
)

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

Expand All @@ -14,15 +8,3 @@ type SuppressionProperties struct {
SuppressionId *string `json:"suppressionId,omitempty"`
Ttl *string `json:"ttl,omitempty"`
}

func (o *SuppressionProperties) GetExpirationTimeStampAsTime() (*time.Time, error) {
if o.ExpirationTimeStamp == nil {
return nil, nil
}
return dates.ParseAsFormat(o.ExpirationTimeStamp, "2006-01-02T15:04:05Z07:00")
}

func (o *SuppressionProperties) SetExpirationTimeStampAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.ExpirationTimeStamp = &formatted
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
package getrecommendations

import (
"time"

"github.com/hashicorp/go-azure-helpers/lang/dates"
)

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

Expand All @@ -30,15 +24,3 @@ type RecommendationProperties struct {
ShortDescription *ShortDescription `json:"shortDescription,omitempty"`
SuppressionIds *[]string `json:"suppressionIds,omitempty"`
}

func (o *RecommendationProperties) GetLastUpdatedAsTime() (*time.Time, error) {
if o.LastUpdated == nil {
return nil, nil
}
return dates.ParseAsFormat(o.LastUpdated, "2006-01-02T15:04:05Z07:00")
}

func (o *RecommendationProperties) SetLastUpdatedAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.LastUpdated = &formatted
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
package prediction

import (
"time"

"github.com/hashicorp/go-azure-helpers/lang/dates"
)

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

Expand All @@ -18,15 +12,3 @@ type PredictionResponseProperties struct {
PredictionType *PredictionType `json:"predictionType,omitempty"`
ShortDescription *ShortDescription `json:"shortDescription,omitempty"`
}

func (o *PredictionResponseProperties) GetLastUpdatedAsTime() (*time.Time, error) {
if o.LastUpdated == nil {
return nil, nil
}
return dates.ParseAsFormat(o.LastUpdated, "2006-01-02T15:04:05Z07:00")
}

func (o *PredictionResponseProperties) SetLastUpdatedAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.LastUpdated = &formatted
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
package suppressions

import (
"time"

"github.com/hashicorp/go-azure-helpers/lang/dates"
)

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See NOTICE.txt in the project root for license information.

Expand All @@ -14,15 +8,3 @@ type SuppressionProperties struct {
SuppressionId *string `json:"suppressionId,omitempty"`
Ttl *string `json:"ttl,omitempty"`
}

func (o *SuppressionProperties) GetExpirationTimeStampAsTime() (*time.Time, error) {
if o.ExpirationTimeStamp == nil {
return nil, nil
}
return dates.ParseAsFormat(o.ExpirationTimeStamp, "2006-01-02T15:04:05Z07:00")
}

func (o *SuppressionProperties) SetExpirationTimeStampAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.ExpirationTimeStamp = &formatted
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ package actionrules
import (
"encoding/json"
"fmt"
"time"

"github.com/hashicorp/go-azure-helpers/lang/dates"
)

// Copyright (c) Microsoft Corporation. All rights reserved.
Expand All @@ -27,30 +24,6 @@ type ActionGroup struct {
Status *ActionRuleStatus `json:"status,omitempty"`
}

func (o *ActionGroup) GetCreatedAtAsTime() (*time.Time, error) {
if o.CreatedAt == nil {
return nil, nil
}
return dates.ParseAsFormat(o.CreatedAt, "2006-01-02T15:04:05Z07:00")
}

func (o *ActionGroup) SetCreatedAtAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.CreatedAt = &formatted
}

func (o *ActionGroup) GetLastModifiedAtAsTime() (*time.Time, error) {
if o.LastModifiedAt == nil {
return nil, nil
}
return dates.ParseAsFormat(o.LastModifiedAt, "2006-01-02T15:04:05Z07:00")
}

func (o *ActionGroup) SetLastModifiedAtAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.LastModifiedAt = &formatted
}

var _ json.Marshaler = ActionGroup{}

func (s ActionGroup) MarshalJSON() ([]byte, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ package actionrules
import (
"encoding/json"
"fmt"
"time"

"github.com/hashicorp/go-azure-helpers/lang/dates"
)

// Copyright (c) Microsoft Corporation. All rights reserved.
Expand All @@ -26,30 +23,6 @@ type Diagnostics struct {
Status *ActionRuleStatus `json:"status,omitempty"`
}

func (o *Diagnostics) GetCreatedAtAsTime() (*time.Time, error) {
if o.CreatedAt == nil {
return nil, nil
}
return dates.ParseAsFormat(o.CreatedAt, "2006-01-02T15:04:05Z07:00")
}

func (o *Diagnostics) SetCreatedAtAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.CreatedAt = &formatted
}

func (o *Diagnostics) GetLastModifiedAtAsTime() (*time.Time, error) {
if o.LastModifiedAt == nil {
return nil, nil
}
return dates.ParseAsFormat(o.LastModifiedAt, "2006-01-02T15:04:05Z07:00")
}

func (o *Diagnostics) SetLastModifiedAtAsTime(input time.Time) {
formatted := input.Format("2006-01-02T15:04:05Z07:00")
o.LastModifiedAt = &formatted
}

var _ json.Marshaler = Diagnostics{}

func (s Diagnostics) MarshalJSON() ([]byte, error) {
Expand Down
Loading

0 comments on commit cb53dfb

Please sign in to comment.