Skip to content

Commit

Permalink
Merge pull request #3758 from rexscaria/rex/update-teams-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobbednarz authored Dec 24, 2024
2 parents e0e1dcd + e11e6c1 commit 98a46a7
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .changelog/3758.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
teams_location: make location parameters optional
```
13 changes: 6 additions & 7 deletions teams_locations.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,15 @@ type TeamsLocation struct {
Ip string `json:"ip,omitempty"`
Subdomain string `json:"doh_subdomain"`
AnonymizedLogsEnabled bool `json:"anonymized_logs_enabled"`
IPv4Destination string `json:"ipv4_destination"`
IPv4DestinationBackup string `json:"ipv4_destination_backup"`
DNSDestinationIPsID string `json:"dns_destination_ips_id"`
DNSDestinationIPv6BlockID string `json:"dns_destination_ipv6_block_id"`
IPv4Destination string `json:"ipv4_destination,omitempty"`
IPv4DestinationBackup string `json:"ipv4_destination_backup,omitempty"`
DNSDestinationIPsID *string `json:"dns_destination_ips_id,omitempty"`
DNSDestinationIPv6BlockID *string `json:"dns_destination_ipv6_block_id,omitempty"`
ClientDefault bool `json:"client_default"`
ECSSupport *bool `json:"ecs_support,omitempty"`
Endpoints *TeamsLocationEndpoints `json:"endpoints,omitempty"`

CreatedAt *time.Time `json:"created_at,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
CreatedAt *time.Time `json:"created_at,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
}

type TeamsLocationEndpoints struct {
Expand Down
6 changes: 4 additions & 2 deletions teams_locations_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ func TestTeamsLocations(t *testing.T) {
createdAt, _ := time.Parse(time.RFC3339, "2020-05-18T22:07:03Z")
updatedAt, _ := time.Parse(time.RFC3339, "2020-05-18T22:07:05Z")

ipv4Id := "9da8e0c9-e9cc-4bbd-85c5-b351fc373354"
ipv6Id := "8da8e0c9-e9cc-4bbd-85c5-b351fc373354"
want := []TeamsLocation{{
ID: "0f8185414dec4a5e9034f3d917c17890",
Name: "home",
Expand All @@ -63,8 +65,8 @@ func TestTeamsLocations(t *testing.T) {
AnonymizedLogsEnabled: false,
IPv4Destination: "1.2.3.4",
IPv4DestinationBackup: "1.2.3.5",
DNSDestinationIPsID: "9da8e0c9-e9cc-4bbd-85c5-b351fc373354",
DNSDestinationIPv6BlockID: "8da8e0c9-e9cc-4bbd-85c5-b351fc373354",
DNSDestinationIPsID: &ipv4Id,
DNSDestinationIPv6BlockID: &ipv6Id,
ClientDefault: false,
ECSSupport: BoolPtr(false),
CreatedAt: &createdAt,
Expand Down

0 comments on commit 98a46a7

Please sign in to comment.