Skip to content

Commit

Permalink
Update to use naming convention
Browse files Browse the repository at this point in the history
  • Loading branch information
ikegentz committed Dec 29, 2023
1 parent 65371be commit da86574
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions internal/api/org.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type OrgResponse struct {
BillingEmail string `json:"billingEmail"`
CreatedAt string `json:"createdAt"`
CreatedBy BasicSubjectProfileResponse `json:"createdBy"`
ID string `json:"id"`
Id string `json:"id"`
IsScimEnabled bool `json:"isScimEnabled"`
ManagedDomains []ManagedDomainResponse `json:"managedDomains"`
Name string `json:"name"`
Expand All @@ -33,15 +33,15 @@ type BasicSubjectProfileResponse struct {
APITokenName string `json:"apiTokenName"`
AvatarUrl string `json:"avatarUrl"`
FullName string `json:"fullName"`
ID string `json:"id"`
Id string `json:"id"`
SubjectType string `json:"subjectType"`
Username string `json:"username"`
}

type ManagedDomainResponse struct {
CreatedAt string `json:"createdAt"`
EnforcedLogins []string `json:"enforcedLogins"`
ID string `json:"id"`
Id string `json:"id"`
Name string `json:"name"`
Status string `json:"status"`
UpdatedAt string `json:"updatedAt"`
Expand Down
10 changes: 5 additions & 5 deletions internal/provider/org_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ type OrgDataSourceModel struct {
BillingEmail types.String `tfsdk:"billing_email"`
CreatedAt types.String `tfsdk:"created_at"`
// CreatedBy BasicSubjectProfileModel `tfsdk:"created_by"`
ID types.String `tfsdk:"id"`
Id types.String `tfsdk:"id"`
IsScimEnabled types.Bool `tfsdk:"is_scim_enabled"`
ManagedDomains []ManagedDomainModel `tfsdk:"managed_domains"`
Name types.String `tfsdk:"name"`
Expand All @@ -42,15 +42,15 @@ type BasicSubjectProfileModel struct {
APITokenName types.String `tfsdk:"api_token_name"`
AvatarUrl types.String `tfsdk:"avatar_url"`
FullName types.String `tfsdk:"full_name"`
ID types.String `tfsdk:"id"`
Id types.String `tfsdk:"id"`
SubjectType types.String `tfsdk:"subject_type"`
Username types.String `tfsdk:"username"`
}

type ManagedDomainModel struct {
CreatedAt types.String `tfsdk:"created_at"`
EnforcedLogins []types.String `tfsdk:"enforced_logins"`
ID types.String `tfsdk:"id"`
Id types.String `tfsdk:"id"`
Name types.String `tfsdk:"name"`
Status types.String `tfsdk:"status"`
UpdatedAt types.String `tfsdk:"updated_at"`
Expand Down Expand Up @@ -206,7 +206,7 @@ func (d *OrgDataSource) Read(ctx context.Context, req datasource.ReadRequest, re
data.BillingEmail = types.StringValue(decoded.BillingEmail)
data.CreatedAt = types.StringValue(decoded.CreatedAt)
// data.CreatedBy = types.Object
data.ID = types.StringValue(decoded.ID)
data.Id = types.StringValue(decoded.Id)
data.IsScimEnabled = types.BoolValue(decoded.IsScimEnabled)
data.ManagedDomains = loadManagedDomainsFromResponse(decoded)
data.Name = types.StringValue(decoded.Name)
Expand All @@ -227,7 +227,7 @@ func loadManagedDomainsFromResponse(org *api.OrgResponse) []ManagedDomainModel {
managedDomains = append(managedDomains, ManagedDomainModel{
CreatedAt: types.StringValue(value.CreatedAt),
EnforcedLogins: loadEnforcedLoginsFromValues(value.EnforcedLogins),
ID: types.StringValue(value.ID),
Id: types.StringValue(value.Id),
Name: types.StringValue(value.Name),
Status: types.StringValue(value.Status),
UpdatedAt: types.StringValue(value.UpdatedAt),
Expand Down

0 comments on commit da86574

Please sign in to comment.