diff --git a/github/enterprise_manage_ghes.go b/github/enterprise_manage_ghes.go new file mode 100644 index 00000000000..e14836eb02e --- /dev/null +++ b/github/enterprise_manage_ghes.go @@ -0,0 +1,163 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" +) + +// NodeQueryOptions specifies the optional parameters to the EnterpriseService +// Node management APIs. +type NodeQueryOptions struct { + // UUID filters issues based on the node UUID. + UUID *string `url:"uuid,omitempty"` + + // ClusterRoles filters the cluster roles from the cluster configuration file. + ClusterRoles *string `url:"cluster_roles,omitempty"` +} + +// ClusterStatus represents a response from the ClusterStatus and ReplicationStatus methods. +type ClusterStatus struct { + Status *string `json:"status,omitempty"` + Nodes []*ClusterStatusNode `json:"nodes"` +} + +// ClusterStatusNode represents the status of a cluster node. +type ClusterStatusNode struct { + Hostname *string `json:"hostname,omitempty"` + Status *string `json:"status,omitempty"` + Services []*ClusterStatusNodeServiceItem `json:"services"` +} + +// ClusterStatusNodeServiceItem represents the status of a service running on a cluster node. +type ClusterStatusNodeServiceItem struct { + Status *string `json:"status,omitempty"` + Name *string `json:"name,omitempty"` + Details *string `json:"details,omitempty"` +} + +// SystemRequirements represents a response from the CheckSystemRequirements method. +type SystemRequirements struct { + Status *string `json:"status,omitempty"` + Nodes []*SystemRequirementsNode `json:"nodes"` +} + +// SystemRequirementsNode represents the status of a system node. +type SystemRequirementsNode struct { + Hostname *string `json:"hostname,omitempty"` + Status *string `json:"status,omitempty"` + RolesStatus []*SystemRequirementsNodeRoleStatus `json:"roles_status"` +} + +// SystemRequirementsNodeRoleStatus represents the status of a role on a system node. +type SystemRequirementsNodeRoleStatus struct { + Status *string `json:"status,omitempty"` + Role *string `json:"role,omitempty"` +} + +// NodeReleaseVersion represents a response from the GetNodeReleaseVersions method. +type NodeReleaseVersion struct { + Hostname *string `json:"hostname,omitempty"` + Version *ReleaseVersion `json:"version"` +} + +// ReleaseVersion holds the release version information of the node. +type ReleaseVersion struct { + Version *string `json:"version,omitempty"` + Platform *string `json:"platform,omitempty"` + BuildID *string `json:"build_id,omitempty"` + BuildDate *string `json:"build_date,omitempty"` +} + +// CheckSystemRequirements checks if GHES system nodes meet the system requirements. +// +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#get-the-system-requirement-check-results-for-configured-cluster-nodes +// +//meta:operation GET /manage/v1/checks/system-requirements +func (s *EnterpriseService) CheckSystemRequirements(ctx context.Context) (*SystemRequirements, *Response, error) { + u := "manage/v1/checks/system-requirements" + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + systemRequirements := new(SystemRequirements) + resp, err := s.client.Do(ctx, req, systemRequirements) + if err != nil { + return nil, resp, err + } + + return systemRequirements, resp, nil +} + +// ClusterStatus gets the status of all services running on each cluster node. +// +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#get-the-status-of-services-running-on-all-cluster-nodes +// +//meta:operation GET /manage/v1/cluster/status +func (s *EnterpriseService) ClusterStatus(ctx context.Context) (*ClusterStatus, *Response, error) { + u := "manage/v1/cluster/status" + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + clusterStatus := new(ClusterStatus) + resp, err := s.client.Do(ctx, req, clusterStatus) + if err != nil { + return nil, resp, err + } + + return clusterStatus, resp, nil +} + +// ReplicationStatus gets the status of all services running on each replica node. +// +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#get-the-status-of-services-running-on-all-replica-nodes +// +//meta:operation GET /manage/v1/replication/status +func (s *EnterpriseService) ReplicationStatus(ctx context.Context, opts *NodeQueryOptions) (*ClusterStatus, *Response, error) { + u, err := addOptions("manage/v1/replication/status", opts) + if err != nil { + return nil, nil, err + } + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + status := new(ClusterStatus) + resp, err := s.client.Do(ctx, req, status) + if err != nil { + return nil, resp, err + } + + return status, resp, nil +} + +// GetNodeReleaseVersions gets the version information deployed to each node. +// +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#get-all-ghes-release-versions-for-all-nodes +// +//meta:operation GET /manage/v1/version +func (s *EnterpriseService) GetNodeReleaseVersions(ctx context.Context, opts *NodeQueryOptions) ([]*NodeReleaseVersion, *Response, error) { + u, err := addOptions("manage/v1/version", opts) + if err != nil { + return nil, nil, err + } + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var releaseVersions []*NodeReleaseVersion + resp, err := s.client.Do(ctx, req, &releaseVersions) + if err != nil { + return nil, resp, err + } + + return releaseVersions, resp, nil +} diff --git a/github/enterprise_manage_ghes_config.go b/github/enterprise_manage_ghes_config.go new file mode 100644 index 00000000000..10fb8590e4f --- /dev/null +++ b/github/enterprise_manage_ghes_config.go @@ -0,0 +1,516 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" + "errors" +) + +// ConfigApplyOptions is a struct to hold the options for the ConfigApply API and the response. +type ConfigApplyOptions struct { + // RunID is the ID of the run to get the status of. If empty a random one will be generated. + RunID *string `json:"run_id,omitempty"` +} + +// ConfigApplyStatus is a struct to hold the response from the ConfigApply API. +type ConfigApplyStatus struct { + Running *bool `json:"running,omitempty"` + Successful *bool `json:"successful,omitempty"` + Nodes []*ConfigApplyStatusNode `json:"nodes"` +} + +// ConfigApplyStatusNode is a struct to hold the response from the ConfigApply API. +type ConfigApplyStatusNode struct { + Hostname *string `json:"hostname,omitempty"` + Running *bool `json:"running,omitempty"` + Successful *bool `json:"successful,omitempty"` + RunID *string `json:"run_id,omitempty"` +} + +// ConfigApplyEventsOptions is used to enable pagination. +type ConfigApplyEventsOptions struct { + LastRequestID *string `url:"last_request_id,omitempty"` +} + +// ConfigApplyEvents is a struct to hold the response from the ConfigApplyEvents API. +type ConfigApplyEvents struct { + Nodes []*ConfigApplyEventsNode `json:"nodes"` +} + +// ConfigApplyEventsNode is a struct to hold the response from the ConfigApplyEvents API. +type ConfigApplyEventsNode struct { + Node *string `json:"node,omitempty"` + LastRequestID *string `json:"last_request_id,omitempty"` + Events []*ConfigApplyEventsNodeEvent `json:"events"` +} + +// ConfigApplyEventsNodeEvent is a struct to hold the response from the ConfigApplyEvents API. +type ConfigApplyEventsNodeEvent struct { + Timestamp *Timestamp `json:"timestamp,omitempty"` + SeverityText *string `json:"severity_text,omitempty"` + Body *string `json:"body,omitempty"` + EventName *string `json:"event_name,omitempty"` + Topology *string `json:"topology,omitempty"` + Hostname *string `json:"hostname,omitempty"` + ConfigRunID *string `json:"config_run_id,omitempty"` + TraceID *string `json:"trace_id,omitempty"` + SpanID *string `json:"span_id,omitempty"` + SpanParentID *int64 `json:"span_parent_id,omitempty"` + SpanDepth *int `json:"span_depth,omitempty"` +} + +// InitialConfigOptions is a struct to hold the options for the InitialConfig API. +type InitialConfigOptions struct { + License string `url:"license"` + Password string `url:"password"` +} + +// LicenseStatus is a struct to hold the response from the License API. +type LicenseStatus struct { + AdvancedSecurityEnabled *bool `json:"advancedSecurityEnabled,omitempty"` + AdvancedSecuritySeats *int `json:"advancedSecuritySeats,omitempty"` + ClusterSupport *bool `json:"clusterSupport,omitempty"` + Company *string `json:"company,omitempty"` + CroquetSupport *bool `json:"croquetSupport,omitempty"` + CustomTerms *bool `json:"customTerms,omitempty"` + Evaluation *bool `json:"evaluation,omitempty"` + ExpireAt *Timestamp `json:"expireAt,omitempty"` + InsightsEnabled *bool `json:"insightsEnabled,omitempty"` + InsightsExpireAt *Timestamp `json:"insightsExpireAt,omitempty"` + LearningLabEvaluationExpires *Timestamp `json:"learningLabEvaluationExpires,omitempty"` + LearningLabSeats *int `json:"learningLabSeats,omitempty"` + Perpetual *bool `json:"perpetual,omitempty"` + ReferenceNumber *string `json:"referenceNumber,omitempty"` + Seats *int `json:"seats,omitempty"` + SSHAllowed *bool `json:"sshAllowed,omitempty"` + SupportKey *string `json:"supportKey,omitempty"` + UnlimitedSeating *bool `json:"unlimitedSeating,omitempty"` +} + +// UploadLicenseOptions is a struct to hold the options for the UploadLicense API. +type UploadLicenseOptions struct { + License string `url:"license"` +} + +// LicenseCheck is a struct to hold the response from the LicenseStatus API. +type LicenseCheck struct { + Status *string `json:"status,omitempty"` +} + +// ConfigSettings is a struct to hold the response from the Settings API. +// There are many fields that link to other structs. +type ConfigSettings struct { + PrivateMode *bool `json:"private_mode,omitempty"` + PublicPages *bool `json:"public_pages,omitempty"` + SubdomainIsolation *bool `json:"subdomain_isolation,omitempty"` + SignupEnabled *bool `json:"signup_enabled,omitempty"` + GithubHostname *string `json:"github_hostname,omitempty"` + IdenticonsHost *string `json:"identicons_host,omitempty"` + HTTPProxy *string `json:"http_proxy,omitempty"` + AuthMode *string `json:"auth_mode,omitempty"` + ExpireSessions *bool `json:"expire_sessions,omitempty"` + AdminPassword *string `json:"admin_password,omitempty"` + ConfigurationID *int64 `json:"configuration_id,omitempty"` + ConfigurationRunCount *int `json:"configuration_run_count,omitempty"` + Avatar *ConfigSettingsAvatar `json:"avatar,omitempty"` + Customer *ConfigSettingsCustomer `json:"customer,omitempty"` + License *ConfigSettingsLicenseSettings `json:"license,omitempty"` + GithubSSL *ConfigSettingsGithubSSL `json:"github_ssl,omitempty"` + LDAP *ConfigSettingsLDAP `json:"ldap,omitempty"` + CAS *ConfigSettingsCAS `json:"cas,omitempty"` + SAML *ConfigSettingsSAML `json:"saml,omitempty"` + GithubOAuth *ConfigSettingsGithubOAuth `json:"github_oauth,omitempty"` + SMTP *ConfigSettingsSMTP `json:"smtp,omitempty"` + NTP *ConfigSettingsNTP `json:"ntp,omitempty"` + Timezone *string `json:"timezone,omitempty"` + SNMP *ConfigSettingsSNMP `json:"snmp,omitempty"` + Syslog *ConfigSettingsSyslog `json:"syslog,omitempty"` + Assets *string `json:"assets,omitempty"` + Pages *ConfigSettingsPagesSettings `json:"pages,omitempty"` + Collectd *ConfigSettingsCollectd `json:"collectd,omitempty"` + Mapping *ConfigSettingsMapping `json:"mapping,omitempty"` + LoadBalancer *string `json:"load_balancer,omitempty"` +} + +// ConfigSettingsAvatar is a struct to hold the response from the Settings API. +type ConfigSettingsAvatar struct { + Enabled *bool `json:"enabled,omitempty"` + URI *string `json:"uri,omitempty"` +} + +// ConfigSettingsCustomer is a struct to hold the response from the Settings API. +type ConfigSettingsCustomer struct { + Name *string `json:"name,omitempty"` + Email *string `json:"email,omitempty"` + UUID *string `json:"uuid,omitempty"` + Secret *string `json:"secret,omitempty"` + PublicKeyData *string `json:"public_key_data,omitempty"` +} + +// ConfigSettingsLicenseSettings is a struct to hold the response from the Settings API. +type ConfigSettingsLicenseSettings struct { + Seats *int `json:"seats,omitempty"` + Evaluation *bool `json:"evaluation,omitempty"` + Perpetual *bool `json:"perpetual,omitempty"` + UnlimitedSeating *bool `json:"unlimited_seating,omitempty"` + SupportKey *string `json:"support_key,omitempty"` + SSHAllowed *bool `json:"ssh_allowed,omitempty"` + ClusterSupport *bool `json:"cluster_support,omitempty"` + ExpireAt *Timestamp `json:"expire_at,omitempty"` +} + +// ConfigSettingsGithubSSL is a struct to hold the response from the Settings API. +type ConfigSettingsGithubSSL struct { + Enabled *bool `json:"enabled,omitempty"` + Cert *string `json:"cert,omitempty"` + Key *string `json:"key,omitempty"` +} + +// ConfigSettingsLDAP is a struct to hold the response from the Settings API. +type ConfigSettingsLDAP struct { + Host *string `json:"host,omitempty"` + Port *int `json:"port,omitempty"` + Base []string `json:"base,omitempty"` + UID *string `json:"uid,omitempty"` + BindDN *string `json:"bind_dn,omitempty"` + Password *string `json:"password,omitempty"` + Method *string `json:"method,omitempty"` + SearchStrategy *string `json:"search_strategy,omitempty"` + UserGroups []string `json:"user_groups,omitempty"` + AdminGroup *string `json:"admin_group,omitempty"` + VirtualAttributeEnabled *bool `json:"virtual_attribute_enabled,omitempty"` + RecursiveGroupSearch *bool `json:"recursive_group_search,omitempty"` + PosixSupport *bool `json:"posix_support,omitempty"` + UserSyncEmails *bool `json:"user_sync_emails,omitempty"` + UserSyncKeys *bool `json:"user_sync_keys,omitempty"` + UserSyncInterval *int `json:"user_sync_interval,omitempty"` + TeamSyncInterval *int `json:"team_sync_interval,omitempty"` + SyncEnabled *bool `json:"sync_enabled,omitempty"` + Reconciliation *ConfigSettingsLDAPReconciliation `json:"reconciliation,omitempty"` + Profile *ConfigSettingsLDAPProfile `json:"profile,omitempty"` +} + +// ConfigSettingsLDAPReconciliation is part of the ConfigSettingsLDAP struct. +type ConfigSettingsLDAPReconciliation struct { + User *string `json:"user,omitempty"` + Org *string `json:"org,omitempty"` +} + +// ConfigSettingsLDAPProfile is part of the ConfigSettingsLDAP struct. +type ConfigSettingsLDAPProfile struct { + UID *string `json:"uid,omitempty"` + Name *string `json:"name,omitempty"` + Mail *string `json:"mail,omitempty"` + Key *string `json:"key,omitempty"` +} + +// ConfigSettingsCAS is a struct to hold the response from the Settings API. +type ConfigSettingsCAS struct { + URL *string `json:"url,omitempty"` +} + +// ConfigSettingsSAML is a struct to hold the response from the Settings API. +type ConfigSettingsSAML struct { + SSOURL *string `json:"sso_url,omitempty"` + Certificate *string `json:"certificate,omitempty"` + CertificatePath *string `json:"certificate_path,omitempty"` + Issuer *string `json:"issuer,omitempty"` + IDPInitiatedSSO *bool `json:"idp_initiated_sso,omitempty"` + DisableAdminDemote *bool `json:"disable_admin_demote,omitempty"` +} + +// ConfigSettingsGithubOAuth is a struct to hold the response from the Settings API. +type ConfigSettingsGithubOAuth struct { + ClientID *string `json:"client_id,omitempty"` + ClientSecret *string `json:"client_secret,omitempty"` + OrganizationName *string `json:"organization_name,omitempty"` + OrganizationTeam *string `json:"organization_team,omitempty"` +} + +// ConfigSettingsSMTP is a struct to hold the response from the Settings API. +type ConfigSettingsSMTP struct { + Enabled *bool `json:"enabled,omitempty"` + Address *string `json:"address,omitempty"` + Authentication *string `json:"authentication,omitempty"` + Port *string `json:"port,omitempty"` + Domain *string `json:"domain,omitempty"` + Username *string `json:"username,omitempty"` + UserName *string `json:"user_name,omitempty"` + EnableStarttlsAuto *bool `json:"enable_starttls_auto,omitempty"` + Password *string `json:"password,omitempty"` + DiscardToNoreplyAddress *bool `json:"discard-to-noreply-address,omitempty"` + SupportAddress *string `json:"support_address,omitempty"` + SupportAddressType *string `json:"support_address_type,omitempty"` + NoreplyAddress *string `json:"noreply_address,omitempty"` +} + +// ConfigSettingsNTP is a struct to hold the response from the Settings API. +type ConfigSettingsNTP struct { + PrimaryServer *string `json:"primary_server,omitempty"` + SecondaryServer *string `json:"secondary_server,omitempty"` +} + +// ConfigSettingsSNMP is a struct to hold the response from the Settings API. +type ConfigSettingsSNMP struct { + Enabled *bool `json:"enabled,omitempty"` + Community *string `json:"community,omitempty"` +} + +// ConfigSettingsSyslog is a struct to hold the response from the Settings API. +type ConfigSettingsSyslog struct { + Enabled *bool `json:"enabled,omitempty"` + Server *string `json:"server,omitempty"` + ProtocolName *string `json:"protocol_name,omitempty"` +} + +// ConfigSettingsPagesSettings is a struct to hold the response from the Settings API. +type ConfigSettingsPagesSettings struct { + Enabled *bool `json:"enabled,omitempty"` +} + +// ConfigSettingsCollectd is a struct to hold the response from the Settings API. +type ConfigSettingsCollectd struct { + Enabled *bool `json:"enabled,omitempty"` + Server *string `json:"server,omitempty"` + Port *int `json:"port,omitempty"` + Encryption *string `json:"encryption,omitempty"` + Username *string `json:"username,omitempty"` + Password *string `json:"password,omitempty"` +} + +// ConfigSettingsMapping is a struct to hold the response from the Settings API. +type ConfigSettingsMapping struct { + Enabled *bool `json:"enabled,omitempty"` + Tileserver *string `json:"tileserver,omitempty"` + Basemap *string `json:"basemap,omitempty"` + Token *string `json:"token,omitempty"` +} + +// NodeMetadataStatus is a struct to hold the response from the NodeMetadata API. +type NodeMetadataStatus struct { + Topology *string `json:"topology,omitempty"` + Nodes []*NodeDetails `json:"nodes"` +} + +// NodeDetails is a struct to hold the response from the NodeMetadata API. +type NodeDetails struct { + Hostname *string `json:"hostname,omitempty"` + UUID *string `json:"uuid,omitempty"` + ClusterRoles []string `json:"cluster_roles,omitempty"` +} + +// ConfigApplyEvents gets events from the command ghe-config-apply. +// +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#list-events-from-ghe-config-apply +// +//meta:operation GET /manage/v1/config/apply/events +func (s *EnterpriseService) ConfigApplyEvents(ctx context.Context, opts *ConfigApplyEventsOptions) (*ConfigApplyEvents, *Response, error) { + u, err := addOptions("manage/v1/config/apply/events", opts) + if err != nil { + return nil, nil, err + } + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + configApplyEvents := new(ConfigApplyEvents) + resp, err := s.client.Do(ctx, req, configApplyEvents) + if err != nil { + return nil, resp, err + } + + return configApplyEvents, resp, nil +} + +// InitialConfig initializes the GitHub Enterprise instance with a license and password. +// After initializing the instance, you need to run an apply to apply the configuration. +// +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#initialize-instance-configuration-with-license-and-password +// +//meta:operation POST /manage/v1/config/init +func (s *EnterpriseService) InitialConfig(ctx context.Context, license, password string) (*Response, error) { + u := "manage/v1/config/init" + + opts := &InitialConfigOptions{ + License: license, + Password: password, + } + + req, err := s.client.NewRequest("POST", u, opts) + if err != nil { + return nil, err + } + + return s.client.Do(ctx, req, nil) +} + +// License gets the current license information for the GitHub Enterprise instance. +// +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#get-the-enterprise-license-information +// +//meta:operation GET /manage/v1/config/license +func (s *EnterpriseService) License(ctx context.Context) ([]*LicenseStatus, *Response, error) { + u := "manage/v1/config/license" + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var licenseStatus []*LicenseStatus + resp, err := s.client.Do(ctx, req, &licenseStatus) + if err != nil { + return nil, resp, err + } + + return licenseStatus, resp, nil +} + +// UploadLicense uploads a new license to the GitHub Enterprise instance. +// +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#upload-an-enterprise-license +// +//meta:operation PUT /manage/v1/config/license +func (s *EnterpriseService) UploadLicense(ctx context.Context, license string) (*Response, error) { + u := "manage/v1/config/license" + opts := &UploadLicenseOptions{ + License: license, + } + req, err := s.client.NewRequest("PUT", u, opts) + if err != nil { + return nil, err + } + + return s.client.Do(ctx, req, nil) +} + +// LicenseStatus gets the current license status for the GitHub Enterprise instance. +// +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#check-a-license +// +//meta:operation GET /manage/v1/config/license/check +func (s *EnterpriseService) LicenseStatus(ctx context.Context) ([]*LicenseCheck, *Response, error) { + u := "manage/v1/config/license/check" + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var checks []*LicenseCheck + resp, err := s.client.Do(ctx, req, &checks) + if err != nil { + return nil, resp, err + } + + return checks, resp, nil +} + +// NodeMetadata gets the metadata for all nodes in the GitHub Enterprise instance. +// This is required for clustered setups. +// +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#get-ghes-node-metadata-for-all-nodes +// +//meta:operation GET /manage/v1/config/nodes +func (s *EnterpriseService) NodeMetadata(ctx context.Context, opts *NodeQueryOptions) (*NodeMetadataStatus, *Response, error) { + u, err := addOptions("manage/v1/config/nodes", opts) + if err != nil { + return nil, nil, err + } + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + status := new(NodeMetadataStatus) + resp, err := s.client.Do(ctx, req, status) + if err != nil { + return nil, resp, err + } + + return status, resp, nil +} + +// Settings gets the current configuration settings for the GitHub Enterprise instance. +// +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#get-the-ghes-settings +// +//meta:operation GET /manage/v1/config/settings +func (s *EnterpriseService) Settings(ctx context.Context) (*ConfigSettings, *Response, error) { + u := "manage/v1/config/settings" + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + configSettings := new(ConfigSettings) + resp, err := s.client.Do(ctx, req, configSettings) + if err != nil { + return nil, resp, err + } + + return configSettings, resp, nil +} + +// UpdateSettings updates the configuration settings for the GitHub Enterprise instance. +// +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#set-settings +// +//meta:operation PUT /manage/v1/config/settings +func (s *EnterpriseService) UpdateSettings(ctx context.Context, opts *ConfigSettings) (*Response, error) { + u := "manage/v1/config/settings" + + if opts == nil { + return nil, errors.New("opts should not be nil") + } + req, err := s.client.NewRequest("PUT", u, opts) + if err != nil { + return nil, err + } + + return s.client.Do(ctx, req, nil) +} + +// ConfigApply triggers a configuration apply run on the GitHub Enterprise instance. +// +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#trigger-a-ghe-config-apply-run +// +//meta:operation POST /manage/v1/config/apply +func (s *EnterpriseService) ConfigApply(ctx context.Context, opts *ConfigApplyOptions) (*ConfigApplyOptions, *Response, error) { + u := "manage/v1/config/apply" + req, err := s.client.NewRequest("POST", u, opts) + if err != nil { + return nil, nil, err + } + + configApplyOptions := new(ConfigApplyOptions) + resp, err := s.client.Do(ctx, req, configApplyOptions) + if err != nil { + return nil, resp, err + } + return configApplyOptions, resp, nil +} + +// ConfigApplyStatus gets the status of a ghe-config-apply run on the GitHub Enterprise instance. +// You can request lat one or specific id one. +// +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#get-the-status-of-a-ghe-config-apply-run +// +//meta:operation GET /manage/v1/config/apply +func (s *EnterpriseService) ConfigApplyStatus(ctx context.Context, opts *ConfigApplyOptions) (*ConfigApplyStatus, *Response, error) { + u := "manage/v1/config/apply" + req, err := s.client.NewRequest("GET", u, opts) + if err != nil { + return nil, nil, err + } + + status := new(ConfigApplyStatus) + resp, err := s.client.Do(ctx, req, status) + if err != nil { + return nil, resp, err + } + return status, resp, nil +} diff --git a/github/enterprise_manage_ghes_config_test.go b/github/enterprise_manage_ghes_config_test.go new file mode 100644 index 00000000000..6fb0f526a25 --- /dev/null +++ b/github/enterprise_manage_ghes_config_test.go @@ -0,0 +1,729 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" + "encoding/json" + "fmt" + "net/http" + "testing" + "time" + + "github.com/google/go-cmp/cmp" +) + +func TestEnterpriseService_Settings(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/manage/v1/config/settings", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + fmt.Fprint(w, `{ + "private_mode": false, + "public_pages": false, + "subdomain_isolation": true, + "signup_enabled": false, + "github_hostname": "ghe.local", + "identicons_host": "dotcom", + "http_proxy": null, + "auth_mode": "default", + "expire_sessions": false, + "admin_password": null, + "configuration_id": 1401777404, + "configuration_run_count": 4, + "avatar": { + "enabled": false, + "uri": "" + }, + "customer": { + "name": "GitHub", + "email": "stannis", + "uuid": "af6cac80-e4e1-012e-d822-1231380e52e9", + "secret_key_data": "-", + "public_key_data": "-" + }, + "license": { + "seats": 0, + "evaluation": false, + "perpetual": false, + "unlimited_seating": true, + "support_key": "ssh-rsa AAAAB3N....", + "ssh_allowed": true, + "cluster_support": false, + "expire_at": "2018-01-01T00:00:00-00:00" + }, + "github_ssl": { + "enabled": false, + "cert": null, + "key": null + }, + "ldap": { + "host": null, + "port": 0, + "base": [], + "uid": null, + "bind_dn": null, + "password": null, + "method": "Plain", + "search_strategy": "detect", + "user_groups": [], + "admin_group": null, + "virtual_attribute_enabled": false, + "recursive_group_search": false, + "posix_support": true, + "user_sync_emails": false, + "user_sync_keys": false, + "user_sync_interval": 4, + "team_sync_interval": 4, + "sync_enabled": false, + "reconciliation": { + "user": null, + "org": null + }, + "profile": { + "uid": "uid", + "name": null, + "mail": null, + "key": null + } + }, + "cas": { + "url": null + }, + "saml": { + "sso_url": null, + "certificate": null, + "certificate_path": null, + "issuer": null, + "idp_initiated_sso": false, + "disable_admin_demote": false + }, + "github_oauth": { + "client_id": "12313412", + "client_secret": "kj123131132", + "organization_name": "Homestar Runners", + "organization_team": "homestarrunners/characters" + }, + "smtp": { + "enabled": true, + "address": "smtp.example.com", + "authentication": "plain", + "port": "1234", + "domain": "blah", + "username": "foo", + "user_name": "mr_foo", + "enable_starttls_auto": true, + "password": "bar", + "discard-to-noreply-address": true, + "support_address": "enterprise@github.com", + "support_address_type": "email", + "noreply_address": "noreply@github.com" + }, + "ntp": { + "primary_server": "0.pool.ntp.org", + "secondary_server": "1.pool.ntp.org" + }, + "timezone": null, + "snmp": { + "enabled": false, + "community": "" + }, + "syslog": { + "enabled": false, + "server": null, + "protocol_name": "udp" + }, + "assets": null, + "pages": { + "enabled": true + }, + "collectd": { + "enabled": false, + "server": null, + "port": 0, + "encryption": null, + "username": null, + "password": null + }, + "mapping": { + "enabled": true, + "tileserver": null, + "basemap": "company.map-qsz2zrvs", + "token": null + }, + "load_balancer": null + }`) + }) + + ctx := context.Background() + configSettings, _, err := client.Enterprise.Settings(ctx) + if err != nil { + t.Errorf("Enterprise.Settings returned error: %v", err) + } + + want := &ConfigSettings{ + PrivateMode: Ptr(false), + PublicPages: Ptr(false), + SubdomainIsolation: Ptr(true), + SignupEnabled: Ptr(false), + GithubHostname: Ptr("ghe.local"), + IdenticonsHost: Ptr("dotcom"), + HTTPProxy: nil, + AuthMode: Ptr("default"), + ExpireSessions: Ptr(false), + AdminPassword: nil, + ConfigurationID: Ptr(int64(1401777404)), + ConfigurationRunCount: Ptr(4), + Avatar: &ConfigSettingsAvatar{ + Enabled: Ptr(false), + URI: Ptr(""), + }, + Customer: &ConfigSettingsCustomer{ + Name: Ptr("GitHub"), + Email: Ptr("stannis"), + UUID: Ptr("af6cac80-e4e1-012e-d822-1231380e52e9"), + Secret: nil, + PublicKeyData: Ptr("-"), + }, + License: &ConfigSettingsLicenseSettings{ + Seats: Ptr(0), + Evaluation: Ptr(false), + Perpetual: Ptr(false), + UnlimitedSeating: Ptr(true), + SupportKey: Ptr("ssh-rsa AAAAB3N...."), + SSHAllowed: Ptr(true), + ClusterSupport: Ptr(false), + ExpireAt: &Timestamp{time.Date(2018, time.January, 1, 0, 0, 0, 0, time.UTC)}, + }, + GithubSSL: &ConfigSettingsGithubSSL{ + Enabled: Ptr(false), + Cert: nil, + Key: nil, + }, + LDAP: &ConfigSettingsLDAP{ + Host: nil, + Port: Ptr(0), + Base: []string{}, + UID: nil, + BindDN: nil, + Password: nil, + Method: Ptr("Plain"), + SearchStrategy: Ptr("detect"), + UserGroups: []string{}, + AdminGroup: nil, + VirtualAttributeEnabled: Ptr(false), + RecursiveGroupSearch: Ptr(false), + PosixSupport: Ptr(true), + UserSyncEmails: Ptr(false), + UserSyncKeys: Ptr(false), + UserSyncInterval: Ptr(4), + TeamSyncInterval: Ptr(4), + SyncEnabled: Ptr(false), + Reconciliation: &ConfigSettingsLDAPReconciliation{ + User: nil, + Org: nil, + }, + Profile: &ConfigSettingsLDAPProfile{ + UID: Ptr("uid"), + Name: nil, + Mail: nil, + Key: nil, + }, + }, + CAS: &ConfigSettingsCAS{ + URL: nil, + }, + SAML: &ConfigSettingsSAML{ + SSOURL: nil, + Certificate: nil, + CertificatePath: nil, + Issuer: nil, + IDPInitiatedSSO: Ptr(false), + DisableAdminDemote: Ptr(false), + }, + GithubOAuth: &ConfigSettingsGithubOAuth{ + ClientID: Ptr("12313412"), + ClientSecret: Ptr("kj123131132"), + OrganizationName: Ptr("Homestar Runners"), + OrganizationTeam: Ptr("homestarrunners/characters"), + }, + SMTP: &ConfigSettingsSMTP{ + Enabled: Ptr(true), + Address: Ptr("smtp.example.com"), + Authentication: Ptr("plain"), + Port: Ptr("1234"), + Domain: Ptr("blah"), + Username: Ptr("foo"), + UserName: Ptr("mr_foo"), + Password: Ptr("bar"), + DiscardToNoreplyAddress: Ptr(true), + SupportAddress: Ptr("enterprise@github.com"), + SupportAddressType: Ptr("email"), + NoreplyAddress: Ptr("noreply@github.com"), + EnableStarttlsAuto: Ptr(true), + }, + NTP: &ConfigSettingsNTP{ + PrimaryServer: Ptr("0.pool.ntp.org"), + SecondaryServer: Ptr("1.pool.ntp.org"), + }, + Timezone: nil, + SNMP: &ConfigSettingsSNMP{ + Enabled: Ptr(false), + Community: Ptr(""), + }, + Syslog: &ConfigSettingsSyslog{ + Enabled: Ptr(false), + Server: nil, + ProtocolName: Ptr("udp"), + }, + Assets: nil, + Pages: &ConfigSettingsPagesSettings{ + Enabled: Ptr(true), + }, + Collectd: &ConfigSettingsCollectd{ + Enabled: Ptr(false), + Server: nil, + Port: Ptr(0), + Encryption: nil, + Username: nil, + Password: nil, + }, + Mapping: &ConfigSettingsMapping{ + Enabled: Ptr(true), + Tileserver: nil, + Basemap: Ptr("company.map-qsz2zrvs"), + Token: nil, + }, + LoadBalancer: nil, + } + if diff := cmp.Diff(want, configSettings); diff != "" { + t.Errorf("diff mismatch (-want +got):\n%v", diff) + } + + const methodName = "Settings" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.Settings(ctx) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestEnterpriseService_NodeMetadata(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/manage/v1/config/nodes", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + testFormValues(t, r, values{ + "uuid": "1234-1234", + "cluster_roles": "primary", + }) + fmt.Fprint(w, `{ + "topology": "Cluster", + "nodes": [{ + "hostname": "data1", + "uuid": "1b6cf518-f97c-11ed-8544-061d81f7eedb", + "cluster_roles": [ + "ConsulServer" + ] + }] + }`) + }) + + opt := &NodeQueryOptions{ + UUID: Ptr("1234-1234"), ClusterRoles: Ptr("primary"), + } + ctx := context.Background() + configNodes, _, err := client.Enterprise.NodeMetadata(ctx, opt) + if err != nil { + t.Errorf("Enterprise.NodeMetadata returned error: %v", err) + } + + want := &NodeMetadataStatus{ + Topology: Ptr("Cluster"), + Nodes: []*NodeDetails{{ + Hostname: Ptr("data1"), + UUID: Ptr("1b6cf518-f97c-11ed-8544-061d81f7eedb"), + ClusterRoles: []string{ + "ConsulServer", + }, + }}, + } + if !cmp.Equal(configNodes, want) { + t.Errorf("Enterprise.NodeMetadata returned %+v, want %+v", configNodes, want) + } + + const methodName = "NodeMetadata" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.NodeMetadata(ctx, opt) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestEnterpriseService_LicenseStatus(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/manage/v1/config/license/check", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + fmt.Fprint(w, `[{ + "status": "valid" + }]`) + }) + + ctx := context.Background() + licenseCheck, _, err := client.Enterprise.LicenseStatus(ctx) + if err != nil { + t.Errorf("Enterprise.LicenseStatus returned error: %v", err) + } + + want := []*LicenseCheck{{ + Status: Ptr("valid"), + }} + if !cmp.Equal(licenseCheck, want) { + t.Errorf("Enterprise.LicenseStatus returned %+v, want %+v", licenseCheck, want) + } + + const methodName = "LicenseStatus" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.LicenseStatus(ctx) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestEnterpriseService_License(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/manage/v1/config/license", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + fmt.Fprint(w, `[{ + "advancedSecurityEnabled": true, + "advancedSecuritySeats": 0, + "clusterSupport": false, + "company": "GitHub", + "croquetSupport": true, + "customTerms": true, + "evaluation": false, + "expireAt": "2018-01-01T00:00:00Z", + "insightsEnabled": true, + "insightsExpireAt": "2018-01-01T00:00:00Z", + "learningLabEvaluationExpires": "2018-01-01T00:00:00Z", + "learningLabSeats": 100, + "perpetual": false, + "referenceNumber": "32a145", + "seats": 0, + "sshAllowed": true, + "supportKey": "", + "unlimitedSeating": true + }]`) + }) + + ctx := context.Background() + license, _, err := client.Enterprise.License(ctx) + if err != nil { + t.Errorf("Enterprise.License returned error: %v", err) + } + + want := []*LicenseStatus{{ + AdvancedSecurityEnabled: Ptr(true), + AdvancedSecuritySeats: Ptr(0), + ClusterSupport: Ptr(false), + Company: Ptr("GitHub"), + CroquetSupport: Ptr(true), + CustomTerms: Ptr(true), + Evaluation: Ptr(false), + ExpireAt: &Timestamp{time.Date(2018, time.January, 1, 0, 0, 0, 0, time.UTC)}, + InsightsEnabled: Ptr(true), + InsightsExpireAt: &Timestamp{time.Date(2018, time.January, 1, 0, 0, 0, 0, time.UTC)}, + LearningLabEvaluationExpires: &Timestamp{time.Date(2018, time.January, 1, 0, 0, 0, 0, time.UTC)}, + LearningLabSeats: Ptr(100), + Perpetual: Ptr(false), + ReferenceNumber: Ptr("32a145"), + Seats: Ptr(0), + SSHAllowed: Ptr(true), + SupportKey: Ptr(""), + UnlimitedSeating: Ptr(true), + }} + if diff := cmp.Diff(want, license); diff != "" { + t.Errorf("diff mismatch (-want +got):\n%v", diff) + } + const methodName = "License" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.License(ctx) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestEnterpriseService_ConfigApplyEvents(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/manage/v1/config/apply/events", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + fmt.Fprint(w, `{ + "nodes": [{ + "node": "ghes-01.lan", + "last_request_id": "387cd628c06d606700e79be368e5e574:0cde553750689c76:0000000000000000", + "events": [{ + "timestamp": "2018-01-01T00:00:00+00:00", + "severity_text": "INFO", + "body": "Validating services", + "event_name": "Enterprise::ConfigApply::PhaseValidation#config_phase_validation", + "topology": "multinode", + "hostname": "ghes-01.lan", + "config_run_id": "d34db33f", + "trace_id": "387cd628c06d606700e79be368e5e574", + "span_id": "0cde553750689c76", + "span_parent_id": 0, + "span_depth": 0 + }] + }] + }`) + }) + + input := &ConfigApplyEventsOptions{ + LastRequestID: Ptr("387cd628c06d606700e79be368e5e574:0cde553750689"), + } + + ctx := context.Background() + configEvents, _, err := client.Enterprise.ConfigApplyEvents(ctx, input) + if err != nil { + t.Errorf("Enterprise.ConfigApplyEvents returned error: %v", err) + } + + want := &ConfigApplyEvents{ + Nodes: []*ConfigApplyEventsNode{{ + Node: Ptr("ghes-01.lan"), + LastRequestID: Ptr("387cd628c06d606700e79be368e5e574:0cde553750689c76:0000000000000000"), + Events: []*ConfigApplyEventsNodeEvent{{ + Timestamp: &Timestamp{time.Date(2018, time.January, 1, 0, 0, 0, 0, time.UTC)}, + SeverityText: Ptr("INFO"), + Body: Ptr("Validating services"), + EventName: Ptr("Enterprise::ConfigApply::PhaseValidation#config_phase_validation"), + Topology: Ptr("multinode"), + Hostname: Ptr("ghes-01.lan"), + ConfigRunID: Ptr("d34db33f"), + TraceID: Ptr("387cd628c06d606700e79be368e5e574"), + SpanID: Ptr("0cde553750689c76"), + SpanParentID: Ptr(int64(0)), + SpanDepth: Ptr(0), + }}, + }}, + } + if diff := cmp.Diff(want, configEvents); diff != "" { + t.Errorf("diff mismatch (-want +got):\n%v", diff) + } + if !cmp.Equal(configEvents, want) { + t.Errorf("Enterprise.ConfigApplyEvents returned %+v, want %+v", configEvents, want) + } + + const methodName = "ConfigApplyEvents" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.ConfigApplyEvents(ctx, input) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestEnterpriseService_UpdateSettings(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/manage/v1/config/settings", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "PUT") + + w.WriteHeader(http.StatusNoContent) + }) + + input := &ConfigSettings{ + PrivateMode: Ptr(false), + } + + ctx := context.Background() + if _, err := client.Enterprise.UpdateSettings(ctx, input); err != nil { + t.Errorf("Enterprise.UpdateSettings returned error: %v", err) + } + + const methodName = "UpdateSettings" + testBadOptions(t, methodName, func() (err error) { + _, err = client.Enterprise.UpdateSettings(ctx, nil) + return err + }) + + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + return client.Enterprise.UpdateSettings(ctx, input) + }) +} + +func TestEnterpriseService_UploadLicense(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/manage/v1/config/license", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "PUT") + + w.WriteHeader(http.StatusNoContent) + }) + + ctx := context.Background() + if _, err := client.Enterprise.UploadLicense(ctx, "abc"); err != nil { + t.Errorf("Enterprise.UploadLicense returned error: %v", err) + } + + const methodName = "UploadLicense" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + return client.Enterprise.UploadLicense(ctx, "") + }) +} + +func TestEnterpriseService_InitialConfig(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + input := &InitialConfigOptions{ + License: "1234-1234", + Password: "password", + } + + mux.HandleFunc("/manage/v1/config/init", func(w http.ResponseWriter, r *http.Request) { + v := new(InitialConfigOptions) + assertNilError(t, json.NewDecoder(r.Body).Decode(v)) + + testMethod(t, r, "POST") + if diff := cmp.Diff(v, input); diff != "" { + t.Errorf("diff mismatch (-want +got):\n%v", diff) + } + }) + + ctx := context.Background() + if _, err := client.Enterprise.InitialConfig(ctx, "1234-1234", "password"); err != nil { + t.Errorf("Enterprise.InitialConfig returned error: %v", err) + } + + const methodName = "InitialConfig" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + return client.Enterprise.InitialConfig(ctx, "", "") + }) +} + +func TestEnterpriseService_ConfigApply(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/manage/v1/config/apply", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "POST") + got := new(ConfigApplyOptions) + assertNilError(t, json.NewDecoder(r.Body).Decode(got)) + + want := &ConfigApplyOptions{ + RunID: Ptr("1234"), + } + if diff := cmp.Diff(want, got); diff != "" { + t.Errorf("diff mismatch (-want +got):\n%v", diff) + } + fmt.Fprint(w, `{ "run_id": "1234" }`) + }) + + input := &ConfigApplyOptions{ + RunID: Ptr("1234"), + } + + ctx := context.Background() + configApply, _, err := client.Enterprise.ConfigApply(ctx, input) + if err != nil { + t.Errorf("Enterprise.ConfigApply returned error: %v", err) + } + want := &ConfigApplyOptions{ + RunID: Ptr("1234"), + } + if !cmp.Equal(configApply, want) { + t.Errorf("Enterprise.ConfigApply returned %+v, want %+v", configApply, want) + } + const methodName = "ConfigApply" + + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.ConfigApply(ctx, input) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestEnterpriseService_ConfigApplyStatus(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/manage/v1/config/apply", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + got := new(ConfigApplyOptions) + assertNilError(t, json.NewDecoder(r.Body).Decode(got)) + + want := &ConfigApplyOptions{ + RunID: Ptr("1234"), + } + if diff := cmp.Diff(want, got); diff != "" { + t.Errorf("diff mismatch (-want +got):\n%v", diff) + } + fmt.Fprint(w, `{ + "running": true, + "successful": false, + "nodes": [ + { + "run_id": "d34db33f", + "hostname": "ghes-01.lan", + "running": true, + "successful": false + } + ] + }`) + }) + input := &ConfigApplyOptions{ + RunID: Ptr("1234"), + } + ctx := context.Background() + configApplyStatus, _, err := client.Enterprise.ConfigApplyStatus(ctx, input) + if err != nil { + t.Errorf("Enterprise.ConfigApplyStatus returned error: %v", err) + } + want := &ConfigApplyStatus{ + Running: Ptr(true), + Successful: Ptr(false), + Nodes: []*ConfigApplyStatusNode{{ + RunID: Ptr("d34db33f"), + Hostname: Ptr("ghes-01.lan"), + Running: Ptr(true), + Successful: Ptr(false), + }}, + } + if !cmp.Equal(configApplyStatus, want) { + t.Errorf("Enterprise.ConfigApplyStatus returned %+v, want %+v", configApplyStatus, want) + } + const methodName = "ConfigApplyStatus" + + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.ConfigApplyStatus(ctx, input) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} diff --git a/github/enterprise_manage_ghes_maintenance.go b/github/enterprise_manage_ghes_maintenance.go new file mode 100644 index 00000000000..3b1de92df13 --- /dev/null +++ b/github/enterprise_manage_ghes_maintenance.go @@ -0,0 +1,94 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" +) + +// MaintenanceOperationStatus represents the message to be displayed when the instance gets a maintenance operation request. +type MaintenanceOperationStatus struct { + Hostname *string `json:"hostname,omitempty"` + UUID *string `json:"uuid,omitempty"` + Message *string `json:"message,omitempty"` +} + +// MaintenanceStatus represents the status of maintenance mode for all nodes. +type MaintenanceStatus struct { + Hostname *string `json:"hostname,omitempty"` + UUID *string `json:"uuid,omitempty"` + Status *string `json:"status,omitempty"` + ScheduledTime *Timestamp `json:"scheduled_time,omitempty"` + ConnectionServices []*ConnectionServiceItem `json:"connection_services,omitempty"` + CanUnsetMaintenance *bool `json:"can_unset_maintenance,omitempty"` + IPExceptionList []string `json:"ip_exception_list,omitempty"` + MaintenanceModeMessage *string `json:"maintenance_mode_message,omitempty"` +} + +// ConnectionServiceItem represents the connection services for the maintenance status. +type ConnectionServiceItem struct { + Name *string `json:"name,omitempty"` + Number *int `json:"number,omitempty"` +} + +// MaintenanceOptions represents the options for setting the maintenance mode for the instance. +// When can be a string, so we can't use a Timestamp type. +type MaintenanceOptions struct { + Enabled bool `json:"enabled"` + UUID *string `json:"uuid,omitempty"` + When *string `json:"when,omitempty"` + IPExceptionList []string `json:"ip_exception_list,omitempty"` + MaintenanceModeMessage *string `json:"maintenance_mode_message,omitempty"` +} + +// GetMaintenanceStatus gets the status of maintenance mode for all nodes. +// +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#get-the-status-of-maintenance-mode +// +//meta:operation GET /manage/v1/maintenance +func (s *EnterpriseService) GetMaintenanceStatus(ctx context.Context, opts *NodeQueryOptions) ([]*MaintenanceStatus, *Response, error) { + u, err := addOptions("manage/v1/maintenance", opts) + if err != nil { + return nil, nil, err + } + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var status []*MaintenanceStatus + resp, err := s.client.Do(ctx, req, &status) + if err != nil { + return nil, resp, err + } + + return status, resp, nil +} + +// CreateMaintenance sets the maintenance mode for the instance. +// With the enable parameter we can control to put instance into maintenance mode or not. With false we can disable the maintenance mode. +// +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#set-the-status-of-maintenance-mode +// +//meta:operation POST /manage/v1/maintenance +func (s *EnterpriseService) CreateMaintenance(ctx context.Context, enable bool, opts *MaintenanceOptions) ([]*MaintenanceOperationStatus, *Response, error) { + u := "manage/v1/maintenance" + + opts.Enabled = enable + + req, err := s.client.NewRequest("POST", u, opts) + if err != nil { + return nil, nil, err + } + + var i []*MaintenanceOperationStatus + resp, err := s.client.Do(ctx, req, &i) + if err != nil { + return nil, resp, err + } + + return i, resp, nil +} diff --git a/github/enterprise_manage_ghes_maintenance_test.go b/github/enterprise_manage_ghes_maintenance_test.go new file mode 100644 index 00000000000..dabbfd45099 --- /dev/null +++ b/github/enterprise_manage_ghes_maintenance_test.go @@ -0,0 +1,129 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" + "encoding/json" + "fmt" + "net/http" + "testing" + "time" + + "github.com/google/go-cmp/cmp" +) + +func TestEnterpriseService_GetMaintenanceStatus(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/manage/v1/maintenance", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + testFormValues(t, r, values{ + "uuid": "1234-1234", + "cluster_roles": "primary", + }) + fmt.Fprint(w, `[{ + "hostname": "primary", + "uuid": "1b6cf518-f97c-11ed-8544-061d81f7eedb", + "status": "scheduled", + "scheduled_time": "2018-01-01T00:00:00+00:00", + "connection_services": [ + { + "name": "git operations", + "number": 15 + } + ], + "can_unset_maintenance": true, + "ip_exception_list": [ + "1.1.1.1" + ], + "maintenance_mode_message": "Scheduled maintenance for upgrading." + }]`) + }) + + opt := &NodeQueryOptions{ + UUID: Ptr("1234-1234"), ClusterRoles: Ptr("primary"), + } + ctx := context.Background() + maintenanceStatus, _, err := client.Enterprise.GetMaintenanceStatus(ctx, opt) + if err != nil { + t.Errorf("Enterprise.GetMaintenanceStatus returned error: %v", err) + } + + want := []*MaintenanceStatus{{ + Hostname: Ptr("primary"), + UUID: Ptr("1b6cf518-f97c-11ed-8544-061d81f7eedb"), + Status: Ptr("scheduled"), + ScheduledTime: &Timestamp{time.Date(2018, time.January, 1, 0, 0, 0, 0, time.UTC)}, + ConnectionServices: []*ConnectionServiceItem{{ + Name: Ptr("git operations"), + Number: Ptr(15), + }}, + CanUnsetMaintenance: Ptr(true), + IPExceptionList: []string{"1.1.1.1"}, + MaintenanceModeMessage: Ptr("Scheduled maintenance for upgrading."), + }} + if !cmp.Equal(maintenanceStatus, want) { + t.Errorf("Enterprise.GetMaintenanceStatus returned %+v, want %+v", maintenanceStatus, want) + } + + const methodName = "GetMaintenanceStatus" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.GetMaintenanceStatus(ctx, opt) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestEnterpriseService_CreateMaintenance(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + input := &MaintenanceOptions{ + Enabled: true, + UUID: Ptr("1234-1234"), + When: Ptr("now"), + IPExceptionList: []string{ + "1.1.1.1", + }, + MaintenanceModeMessage: Ptr("Scheduled maintenance for upgrading."), + } + + mux.HandleFunc("/manage/v1/maintenance", func(w http.ResponseWriter, r *http.Request) { + v := new(MaintenanceOptions) + assertNilError(t, json.NewDecoder(r.Body).Decode(v)) + + testMethod(t, r, "POST") + if !cmp.Equal(v, input) { + t.Errorf("Request body = %+v, want %+v", v, input) + } + + fmt.Fprint(w, `[ { "hostname": "primary", "uuid": "1b6cf518-f97c-11ed-8544-061d81f7eedb", "message": "Scheduled maintenance for upgrading." } ]`) + }) + + ctx := context.Background() + maintenanceStatus, _, err := client.Enterprise.CreateMaintenance(ctx, true, input) + if err != nil { + t.Errorf("Enterprise.CreateMaintenance returned error: %v", err) + } + + want := []*MaintenanceOperationStatus{{Hostname: Ptr("primary"), UUID: Ptr("1b6cf518-f97c-11ed-8544-061d81f7eedb"), Message: Ptr("Scheduled maintenance for upgrading.")}} + if diff := cmp.Diff(want, maintenanceStatus); diff != "" { + t.Errorf("diff mismatch (-want +got):\n%v", diff) + } + + const methodName = "CreateMaintenance" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.CreateMaintenance(ctx, true, input) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} diff --git a/github/enterprise_manage_ghes_ssh.go b/github/enterprise_manage_ghes_ssh.go new file mode 100644 index 00000000000..77d25216593 --- /dev/null +++ b/github/enterprise_manage_ghes_ssh.go @@ -0,0 +1,99 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" +) + +// SSHKeyStatus represents the status of a SSH key operation. +type SSHKeyStatus struct { + Hostname *string `json:"hostname,omitempty"` + UUID *string `json:"uuid,omitempty"` + Message *string `json:"message,omitempty"` + Modified *bool `json:"modified,omitempty"` +} + +// SSHKeyOptions specifies the parameters to the SSH create and delete functions. +type SSHKeyOptions struct { + // Key is the SSH key to add to the instance. + Key string `json:"key"` +} + +// ClusterSSHKey represents the SSH keys configured for the instance. +type ClusterSSHKey struct { + Key *string `json:"key,omitempty"` + Fingerprint *string `json:"fingerprint,omitempty"` +} + +// DeleteSSHKey deletes the SSH key from the instance. +// +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#delete-a-ssh-key +// +//meta:operation DELETE /manage/v1/access/ssh +func (s *EnterpriseService) DeleteSSHKey(ctx context.Context, key string) ([]*SSHKeyStatus, *Response, error) { + u := "manage/v1/access/ssh" + opts := &SSHKeyOptions{ + Key: key, + } + req, err := s.client.NewRequest("DELETE", u, opts) + if err != nil { + return nil, nil, err + } + + var sshStatus []*SSHKeyStatus + resp, err := s.client.Do(ctx, req, &sshStatus) + if err != nil { + return nil, resp, err + } + + return sshStatus, resp, nil +} + +// GetSSHKey gets the SSH keys configured for the instance. +// +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#get-the-configured-ssh-keys +// +//meta:operation GET /manage/v1/access/ssh +func (s *EnterpriseService) GetSSHKey(ctx context.Context) ([]*ClusterSSHKey, *Response, error) { + u := "manage/v1/access/ssh" + req, err := s.client.NewRequest("GET", u, nil) + if err != nil { + return nil, nil, err + } + + var sshKeys []*ClusterSSHKey + resp, err := s.client.Do(ctx, req, &sshKeys) + if err != nil { + return nil, resp, err + } + + return sshKeys, resp, nil +} + +// CreateSSHKey adds a new SSH key to the instance. +// +// GitHub API docs: https://docs.github.com/enterprise-server@3.15/rest/enterprise-admin/manage-ghes#set-a-new-ssh-key +// +//meta:operation POST /manage/v1/access/ssh +func (s *EnterpriseService) CreateSSHKey(ctx context.Context, key string) ([]*SSHKeyStatus, *Response, error) { + u := "manage/v1/access/ssh" + opts := &SSHKeyOptions{ + Key: key, + } + req, err := s.client.NewRequest("POST", u, opts) + if err != nil { + return nil, nil, err + } + + var sshKeyResponse []*SSHKeyStatus + resp, err := s.client.Do(ctx, req, &sshKeyResponse) + if err != nil { + return nil, resp, err + } + + return sshKeyResponse, resp, nil +} diff --git a/github/enterprise_manage_ghes_ssh_test.go b/github/enterprise_manage_ghes_ssh_test.go new file mode 100644 index 00000000000..b8ed236644f --- /dev/null +++ b/github/enterprise_manage_ghes_ssh_test.go @@ -0,0 +1,134 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" + "encoding/json" + "fmt" + "net/http" + "testing" + + "github.com/google/go-cmp/cmp" +) + +func TestEnterpriseService_GetSSHKey(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/manage/v1/access/ssh", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + fmt.Fprint(w, `[{ + "key": "ssh-rsa 1234", + "fingerprint": "bd" + }]`) + }) + + ctx := context.Background() + accessSSH, _, err := client.Enterprise.GetSSHKey(ctx) + if err != nil { + t.Errorf("Enterprise.GetSSHKey returned error: %v", err) + } + + want := []*ClusterSSHKey{{ + Key: Ptr("ssh-rsa 1234"), + Fingerprint: Ptr("bd"), + }} + if !cmp.Equal(accessSSH, want) { + t.Errorf("Enterprise.GetSSHKey returned %+v, want %+v", accessSSH, want) + } + + const methodName = "GetSSHKey" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.GetSSHKey(ctx) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestEnterpriseService_DeleteSSHKey(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + input := &SSHKeyOptions{ + Key: "ssh-rsa 1234", + } + + mux.HandleFunc("/manage/v1/access/ssh", func(w http.ResponseWriter, r *http.Request) { + v := new(SSHKeyOptions) + assertNilError(t, json.NewDecoder(r.Body).Decode(v)) + + testMethod(t, r, "DELETE") + if !cmp.Equal(v, input) { + t.Errorf("Request body = %+v, want %+v", v, input) + } + + fmt.Fprint(w, `[ { "hostname": "primary", "uuid": "1b6cf518-f97c-11ed-8544-061d81f7eedb", "message": "SSH key removed successfully" } ]`) + }) + + ctx := context.Background() + sshStatus, _, err := client.Enterprise.DeleteSSHKey(ctx, "ssh-rsa 1234") + if err != nil { + t.Errorf("Enterprise.DeleteSSHKey returned error: %v", err) + } + + want := []*SSHKeyStatus{{Hostname: Ptr("primary"), UUID: Ptr("1b6cf518-f97c-11ed-8544-061d81f7eedb"), Message: Ptr("SSH key removed successfully")}} + if diff := cmp.Diff(want, sshStatus); diff != "" { + t.Errorf("diff mismatch (-want +got):\n%v", diff) + } + + const methodName = "DeleteSSHKey" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.DeleteSSHKey(ctx, "ssh-rsa 1234") + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestEnterpriseService_CreateSSHKey(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + input := &SSHKeyOptions{ + Key: "ssh-rsa 1234", + } + + mux.HandleFunc("/manage/v1/access/ssh", func(w http.ResponseWriter, r *http.Request) { + v := new(SSHKeyOptions) + assertNilError(t, json.NewDecoder(r.Body).Decode(v)) + + testMethod(t, r, "POST") + if !cmp.Equal(v, input) { + t.Errorf("Request body = %+v, want %+v", v, input) + } + + fmt.Fprint(w, `[ { "hostname": "primary", "uuid": "1b6cf518-f97c-11ed-8544-061d81f7eedb", "message": "SSH key added successfully", "modified": true } ]`) + }) + + ctx := context.Background() + sshStatus, _, err := client.Enterprise.CreateSSHKey(ctx, "ssh-rsa 1234") + if err != nil { + t.Errorf("Enterprise.CreateSSHKey returned error: %v", err) + } + + want := []*SSHKeyStatus{{Hostname: Ptr("primary"), UUID: Ptr("1b6cf518-f97c-11ed-8544-061d81f7eedb"), Message: Ptr("SSH key added successfully"), Modified: Ptr(true)}} + if diff := cmp.Diff(want, sshStatus); diff != "" { + t.Errorf("diff mismatch (-want +got):\n%v", diff) + } + + const methodName = "CreateSSHKey" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.CreateSSHKey(ctx, "ssh-rsa 1234") + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} diff --git a/github/enterprise_manage_ghes_test.go b/github/enterprise_manage_ghes_test.go new file mode 100644 index 00000000000..7f947eb320e --- /dev/null +++ b/github/enterprise_manage_ghes_test.go @@ -0,0 +1,213 @@ +// Copyright 2025 The go-github AUTHORS. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +package github + +import ( + "context" + "fmt" + "net/http" + "testing" + + "github.com/google/go-cmp/cmp" +) + +func TestEnterpriseService_CheckSystemRequirements(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/manage/v1/checks/system-requirements", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + fmt.Fprint(w, `{ + "status": "OK", + "nodes": [{ + "hostname": "primary", + "status": "OK", + "roles_status": [{ + "status": "OK", + "role": "ConsulServer" + } + ]} + ]}`) + }) + + ctx := context.Background() + systemRequirements, _, err := client.Enterprise.CheckSystemRequirements(ctx) + if err != nil { + t.Errorf("Enterprise.CheckSystemRequirements returned error: %v", err) + } + + want := &SystemRequirements{ + Status: Ptr("OK"), + Nodes: []*SystemRequirementsNode{{ + Hostname: Ptr("primary"), + Status: Ptr("OK"), + RolesStatus: []*SystemRequirementsNodeRoleStatus{{ + Status: Ptr("OK"), + Role: Ptr("ConsulServer"), + }}, + }}, + } + if !cmp.Equal(systemRequirements, want) { + t.Errorf("Enterprise.CheckSystemRequirements returned %+v, want %+v", systemRequirements, want) + } + + const methodName = "CheckSystemRequirements" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.CheckSystemRequirements(ctx) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestEnterpriseService_ClusterStatus(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/manage/v1/cluster/status", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + fmt.Fprint(w, `{ + "status": "OK", + "nodes": [{ + "hostname": "primary", + "status": "OK", + "services": [] + }] + }`) + }) + + ctx := context.Background() + clusterStatus, _, err := client.Enterprise.ClusterStatus(ctx) + if err != nil { + t.Errorf("Enterprise.ClusterStatus returned error: %v", err) + } + + want := &ClusterStatus{ + Status: Ptr("OK"), + Nodes: []*ClusterStatusNode{{ + Hostname: Ptr("primary"), + Status: Ptr("OK"), + Services: []*ClusterStatusNodeServiceItem{}, + }}, + } + if !cmp.Equal(clusterStatus, want) { + t.Errorf("Enterprise.ClusterStatus returned %+v, want %+v", clusterStatus, want) + } + + const methodName = "ClusterStatus" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.ClusterStatus(ctx) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestEnterpriseService_ReplicationStatus(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/manage/v1/replication/status", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + testFormValues(t, r, values{ + "uuid": "1234-1234", + "cluster_roles": "primary", + }) + fmt.Fprint(w, `{ + "status": "OK", + "nodes": [{ + "hostname": "primary", + "status": "OK", + "services": [] + }] + }`) + }) + + opt := &NodeQueryOptions{ + UUID: Ptr("1234-1234"), ClusterRoles: Ptr("primary"), + } + ctx := context.Background() + replicationStatus, _, err := client.Enterprise.ReplicationStatus(ctx, opt) + if err != nil { + t.Errorf("Enterprise.ReplicationStatus returned error: %v", err) + } + + want := &ClusterStatus{ + Status: Ptr("OK"), + Nodes: []*ClusterStatusNode{{ + Hostname: Ptr("primary"), + Status: Ptr("OK"), + Services: []*ClusterStatusNodeServiceItem{}, + }}, + } + if !cmp.Equal(replicationStatus, want) { + t.Errorf("Enterprise.ReplicationStatus returned %+v, want %+v", replicationStatus, want) + } + + const methodName = "ReplicationStatus" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.ReplicationStatus(ctx, opt) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} + +func TestEnterpriseService_Versions(t *testing.T) { + t.Parallel() + client, mux, _ := setup(t) + + mux.HandleFunc("/manage/v1/version", func(w http.ResponseWriter, r *http.Request) { + testMethod(t, r, "GET") + testFormValues(t, r, values{ + "uuid": "1234-1234", + "cluster_roles": "primary", + }) + fmt.Fprint(w, `[{ + "hostname": "primary", + "version": { + "version": "3.9.0", + "platform": "azure", + "build_id": "fc542058b5", + "build_date": "2023-05-02" + } + }]`) + }) + + opt := &NodeQueryOptions{ + UUID: Ptr("1234-1234"), ClusterRoles: Ptr("primary"), + } + ctx := context.Background() + releaseVersions, _, err := client.Enterprise.GetNodeReleaseVersions(ctx, opt) + if err != nil { + t.Errorf("Enterprise.GetNodeReleaseVersions returned error: %v", err) + } + + want := []*NodeReleaseVersion{{ + Hostname: Ptr("primary"), + Version: &ReleaseVersion{ + Version: Ptr("3.9.0"), + Platform: Ptr("azure"), + BuildID: Ptr("fc542058b5"), + BuildDate: Ptr("2023-05-02"), + }, + }} + if !cmp.Equal(releaseVersions, want) { + t.Errorf("Enterprise.GetNodeReleaseVersions returned %+v, want %+v", releaseVersions, want) + } + + const methodName = "GetNodeReleaseVersions" + testNewRequestAndDoFailure(t, methodName, client, func() (*Response, error) { + got, resp, err := client.Enterprise.GetNodeReleaseVersions(ctx, opt) + if got != nil { + t.Errorf("testNewRequestAndDoFailure %v = %#v, want nil", methodName, got) + } + return resp, err + }) +} diff --git a/github/github-accessors.go b/github/github-accessors.go index ec7ac4f7b20..601c0a52612 100644 --- a/github/github-accessors.go +++ b/github/github-accessors.go @@ -2462,6 +2462,70 @@ func (c *CheckSuitePreferenceResults) GetRepository() *Repository { return c.Repository } +// GetFingerprint returns the Fingerprint field if it's non-nil, zero value otherwise. +func (c *ClusterSSHKey) GetFingerprint() string { + if c == nil || c.Fingerprint == nil { + return "" + } + return *c.Fingerprint +} + +// GetKey returns the Key field if it's non-nil, zero value otherwise. +func (c *ClusterSSHKey) GetKey() string { + if c == nil || c.Key == nil { + return "" + } + return *c.Key +} + +// GetStatus returns the Status field if it's non-nil, zero value otherwise. +func (c *ClusterStatus) GetStatus() string { + if c == nil || c.Status == nil { + return "" + } + return *c.Status +} + +// GetHostname returns the Hostname field if it's non-nil, zero value otherwise. +func (c *ClusterStatusNode) GetHostname() string { + if c == nil || c.Hostname == nil { + return "" + } + return *c.Hostname +} + +// GetStatus returns the Status field if it's non-nil, zero value otherwise. +func (c *ClusterStatusNode) GetStatus() string { + if c == nil || c.Status == nil { + return "" + } + return *c.Status +} + +// GetDetails returns the Details field if it's non-nil, zero value otherwise. +func (c *ClusterStatusNodeServiceItem) GetDetails() string { + if c == nil || c.Details == nil { + return "" + } + return *c.Details +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (c *ClusterStatusNodeServiceItem) GetName() string { + if c == nil || c.Name == nil { + return "" + } + return *c.Name +} + +// GetStatus returns the Status field if it's non-nil, zero value otherwise. +func (c *ClusterStatusNodeServiceItem) GetStatus() string { + if c == nil || c.Status == nil { + return "" + } + return *c.Status +} + // GetBody returns the Body field if it's non-nil, zero value otherwise. func (c *CodeOfConduct) GetBody() string { if c == nil || c.Body == nil { @@ -3998,44 +4062,1140 @@ func (c *CommunityHealthMetrics) GetContentReportsEnabled() bool { return *c.ContentReportsEnabled } -// GetDescription returns the Description field if it's non-nil, zero value otherwise. -func (c *CommunityHealthMetrics) GetDescription() string { - if c == nil || c.Description == nil { +// GetDescription returns the Description field if it's non-nil, zero value otherwise. +func (c *CommunityHealthMetrics) GetDescription() string { + if c == nil || c.Description == nil { + return "" + } + return *c.Description +} + +// GetDocumentation returns the Documentation field if it's non-nil, zero value otherwise. +func (c *CommunityHealthMetrics) GetDocumentation() string { + if c == nil || c.Documentation == nil { + return "" + } + return *c.Documentation +} + +// GetFiles returns the Files field. +func (c *CommunityHealthMetrics) GetFiles() *CommunityHealthFiles { + if c == nil { + return nil + } + return c.Files +} + +// GetHealthPercentage returns the HealthPercentage field if it's non-nil, zero value otherwise. +func (c *CommunityHealthMetrics) GetHealthPercentage() int { + if c == nil || c.HealthPercentage == nil { + return 0 + } + return *c.HealthPercentage +} + +// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. +func (c *CommunityHealthMetrics) GetUpdatedAt() Timestamp { + if c == nil || c.UpdatedAt == nil { + return Timestamp{} + } + return *c.UpdatedAt +} + +// GetLastRequestID returns the LastRequestID field if it's non-nil, zero value otherwise. +func (c *ConfigApplyEventsNode) GetLastRequestID() string { + if c == nil || c.LastRequestID == nil { + return "" + } + return *c.LastRequestID +} + +// GetNode returns the Node field if it's non-nil, zero value otherwise. +func (c *ConfigApplyEventsNode) GetNode() string { + if c == nil || c.Node == nil { + return "" + } + return *c.Node +} + +// GetBody returns the Body field if it's non-nil, zero value otherwise. +func (c *ConfigApplyEventsNodeEvent) GetBody() string { + if c == nil || c.Body == nil { + return "" + } + return *c.Body +} + +// GetConfigRunID returns the ConfigRunID field if it's non-nil, zero value otherwise. +func (c *ConfigApplyEventsNodeEvent) GetConfigRunID() string { + if c == nil || c.ConfigRunID == nil { + return "" + } + return *c.ConfigRunID +} + +// GetEventName returns the EventName field if it's non-nil, zero value otherwise. +func (c *ConfigApplyEventsNodeEvent) GetEventName() string { + if c == nil || c.EventName == nil { + return "" + } + return *c.EventName +} + +// GetHostname returns the Hostname field if it's non-nil, zero value otherwise. +func (c *ConfigApplyEventsNodeEvent) GetHostname() string { + if c == nil || c.Hostname == nil { + return "" + } + return *c.Hostname +} + +// GetSeverityText returns the SeverityText field if it's non-nil, zero value otherwise. +func (c *ConfigApplyEventsNodeEvent) GetSeverityText() string { + if c == nil || c.SeverityText == nil { + return "" + } + return *c.SeverityText +} + +// GetSpanDepth returns the SpanDepth field if it's non-nil, zero value otherwise. +func (c *ConfigApplyEventsNodeEvent) GetSpanDepth() int { + if c == nil || c.SpanDepth == nil { + return 0 + } + return *c.SpanDepth +} + +// GetSpanID returns the SpanID field if it's non-nil, zero value otherwise. +func (c *ConfigApplyEventsNodeEvent) GetSpanID() string { + if c == nil || c.SpanID == nil { + return "" + } + return *c.SpanID +} + +// GetSpanParentID returns the SpanParentID field if it's non-nil, zero value otherwise. +func (c *ConfigApplyEventsNodeEvent) GetSpanParentID() int64 { + if c == nil || c.SpanParentID == nil { + return 0 + } + return *c.SpanParentID +} + +// GetTimestamp returns the Timestamp field if it's non-nil, zero value otherwise. +func (c *ConfigApplyEventsNodeEvent) GetTimestamp() Timestamp { + if c == nil || c.Timestamp == nil { + return Timestamp{} + } + return *c.Timestamp +} + +// GetTopology returns the Topology field if it's non-nil, zero value otherwise. +func (c *ConfigApplyEventsNodeEvent) GetTopology() string { + if c == nil || c.Topology == nil { + return "" + } + return *c.Topology +} + +// GetTraceID returns the TraceID field if it's non-nil, zero value otherwise. +func (c *ConfigApplyEventsNodeEvent) GetTraceID() string { + if c == nil || c.TraceID == nil { + return "" + } + return *c.TraceID +} + +// GetLastRequestID returns the LastRequestID field if it's non-nil, zero value otherwise. +func (c *ConfigApplyEventsOptions) GetLastRequestID() string { + if c == nil || c.LastRequestID == nil { + return "" + } + return *c.LastRequestID +} + +// GetRunID returns the RunID field if it's non-nil, zero value otherwise. +func (c *ConfigApplyOptions) GetRunID() string { + if c == nil || c.RunID == nil { + return "" + } + return *c.RunID +} + +// GetRunning returns the Running field if it's non-nil, zero value otherwise. +func (c *ConfigApplyStatus) GetRunning() bool { + if c == nil || c.Running == nil { + return false + } + return *c.Running +} + +// GetSuccessful returns the Successful field if it's non-nil, zero value otherwise. +func (c *ConfigApplyStatus) GetSuccessful() bool { + if c == nil || c.Successful == nil { + return false + } + return *c.Successful +} + +// GetHostname returns the Hostname field if it's non-nil, zero value otherwise. +func (c *ConfigApplyStatusNode) GetHostname() string { + if c == nil || c.Hostname == nil { + return "" + } + return *c.Hostname +} + +// GetRunID returns the RunID field if it's non-nil, zero value otherwise. +func (c *ConfigApplyStatusNode) GetRunID() string { + if c == nil || c.RunID == nil { + return "" + } + return *c.RunID +} + +// GetRunning returns the Running field if it's non-nil, zero value otherwise. +func (c *ConfigApplyStatusNode) GetRunning() bool { + if c == nil || c.Running == nil { + return false + } + return *c.Running +} + +// GetSuccessful returns the Successful field if it's non-nil, zero value otherwise. +func (c *ConfigApplyStatusNode) GetSuccessful() bool { + if c == nil || c.Successful == nil { + return false + } + return *c.Successful +} + +// GetAdminPassword returns the AdminPassword field if it's non-nil, zero value otherwise. +func (c *ConfigSettings) GetAdminPassword() string { + if c == nil || c.AdminPassword == nil { + return "" + } + return *c.AdminPassword +} + +// GetAssets returns the Assets field if it's non-nil, zero value otherwise. +func (c *ConfigSettings) GetAssets() string { + if c == nil || c.Assets == nil { + return "" + } + return *c.Assets +} + +// GetAuthMode returns the AuthMode field if it's non-nil, zero value otherwise. +func (c *ConfigSettings) GetAuthMode() string { + if c == nil || c.AuthMode == nil { + return "" + } + return *c.AuthMode +} + +// GetAvatar returns the Avatar field. +func (c *ConfigSettings) GetAvatar() *ConfigSettingsAvatar { + if c == nil { + return nil + } + return c.Avatar +} + +// GetCAS returns the CAS field. +func (c *ConfigSettings) GetCAS() *ConfigSettingsCAS { + if c == nil { + return nil + } + return c.CAS +} + +// GetCollectd returns the Collectd field. +func (c *ConfigSettings) GetCollectd() *ConfigSettingsCollectd { + if c == nil { + return nil + } + return c.Collectd +} + +// GetConfigurationID returns the ConfigurationID field if it's non-nil, zero value otherwise. +func (c *ConfigSettings) GetConfigurationID() int64 { + if c == nil || c.ConfigurationID == nil { + return 0 + } + return *c.ConfigurationID +} + +// GetConfigurationRunCount returns the ConfigurationRunCount field if it's non-nil, zero value otherwise. +func (c *ConfigSettings) GetConfigurationRunCount() int { + if c == nil || c.ConfigurationRunCount == nil { + return 0 + } + return *c.ConfigurationRunCount +} + +// GetCustomer returns the Customer field. +func (c *ConfigSettings) GetCustomer() *ConfigSettingsCustomer { + if c == nil { + return nil + } + return c.Customer +} + +// GetExpireSessions returns the ExpireSessions field if it's non-nil, zero value otherwise. +func (c *ConfigSettings) GetExpireSessions() bool { + if c == nil || c.ExpireSessions == nil { + return false + } + return *c.ExpireSessions +} + +// GetGithubHostname returns the GithubHostname field if it's non-nil, zero value otherwise. +func (c *ConfigSettings) GetGithubHostname() string { + if c == nil || c.GithubHostname == nil { + return "" + } + return *c.GithubHostname +} + +// GetGithubOAuth returns the GithubOAuth field. +func (c *ConfigSettings) GetGithubOAuth() *ConfigSettingsGithubOAuth { + if c == nil { + return nil + } + return c.GithubOAuth +} + +// GetGithubSSL returns the GithubSSL field. +func (c *ConfigSettings) GetGithubSSL() *ConfigSettingsGithubSSL { + if c == nil { + return nil + } + return c.GithubSSL +} + +// GetHTTPProxy returns the HTTPProxy field if it's non-nil, zero value otherwise. +func (c *ConfigSettings) GetHTTPProxy() string { + if c == nil || c.HTTPProxy == nil { + return "" + } + return *c.HTTPProxy +} + +// GetIdenticonsHost returns the IdenticonsHost field if it's non-nil, zero value otherwise. +func (c *ConfigSettings) GetIdenticonsHost() string { + if c == nil || c.IdenticonsHost == nil { + return "" + } + return *c.IdenticonsHost +} + +// GetLDAP returns the LDAP field. +func (c *ConfigSettings) GetLDAP() *ConfigSettingsLDAP { + if c == nil { + return nil + } + return c.LDAP +} + +// GetLicense returns the License field. +func (c *ConfigSettings) GetLicense() *ConfigSettingsLicenseSettings { + if c == nil { + return nil + } + return c.License +} + +// GetLoadBalancer returns the LoadBalancer field if it's non-nil, zero value otherwise. +func (c *ConfigSettings) GetLoadBalancer() string { + if c == nil || c.LoadBalancer == nil { + return "" + } + return *c.LoadBalancer +} + +// GetMapping returns the Mapping field. +func (c *ConfigSettings) GetMapping() *ConfigSettingsMapping { + if c == nil { + return nil + } + return c.Mapping +} + +// GetNTP returns the NTP field. +func (c *ConfigSettings) GetNTP() *ConfigSettingsNTP { + if c == nil { + return nil + } + return c.NTP +} + +// GetPages returns the Pages field. +func (c *ConfigSettings) GetPages() *ConfigSettingsPagesSettings { + if c == nil { + return nil + } + return c.Pages +} + +// GetPrivateMode returns the PrivateMode field if it's non-nil, zero value otherwise. +func (c *ConfigSettings) GetPrivateMode() bool { + if c == nil || c.PrivateMode == nil { + return false + } + return *c.PrivateMode +} + +// GetPublicPages returns the PublicPages field if it's non-nil, zero value otherwise. +func (c *ConfigSettings) GetPublicPages() bool { + if c == nil || c.PublicPages == nil { + return false + } + return *c.PublicPages +} + +// GetSAML returns the SAML field. +func (c *ConfigSettings) GetSAML() *ConfigSettingsSAML { + if c == nil { + return nil + } + return c.SAML +} + +// GetSignupEnabled returns the SignupEnabled field if it's non-nil, zero value otherwise. +func (c *ConfigSettings) GetSignupEnabled() bool { + if c == nil || c.SignupEnabled == nil { + return false + } + return *c.SignupEnabled +} + +// GetSMTP returns the SMTP field. +func (c *ConfigSettings) GetSMTP() *ConfigSettingsSMTP { + if c == nil { + return nil + } + return c.SMTP +} + +// GetSNMP returns the SNMP field. +func (c *ConfigSettings) GetSNMP() *ConfigSettingsSNMP { + if c == nil { + return nil + } + return c.SNMP +} + +// GetSubdomainIsolation returns the SubdomainIsolation field if it's non-nil, zero value otherwise. +func (c *ConfigSettings) GetSubdomainIsolation() bool { + if c == nil || c.SubdomainIsolation == nil { + return false + } + return *c.SubdomainIsolation +} + +// GetSyslog returns the Syslog field. +func (c *ConfigSettings) GetSyslog() *ConfigSettingsSyslog { + if c == nil { + return nil + } + return c.Syslog +} + +// GetTimezone returns the Timezone field if it's non-nil, zero value otherwise. +func (c *ConfigSettings) GetTimezone() string { + if c == nil || c.Timezone == nil { + return "" + } + return *c.Timezone +} + +// GetEnabled returns the Enabled field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsAvatar) GetEnabled() bool { + if c == nil || c.Enabled == nil { + return false + } + return *c.Enabled +} + +// GetURI returns the URI field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsAvatar) GetURI() string { + if c == nil || c.URI == nil { + return "" + } + return *c.URI +} + +// GetURL returns the URL field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsCAS) GetURL() string { + if c == nil || c.URL == nil { + return "" + } + return *c.URL +} + +// GetEnabled returns the Enabled field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsCollectd) GetEnabled() bool { + if c == nil || c.Enabled == nil { + return false + } + return *c.Enabled +} + +// GetEncryption returns the Encryption field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsCollectd) GetEncryption() string { + if c == nil || c.Encryption == nil { + return "" + } + return *c.Encryption +} + +// GetPassword returns the Password field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsCollectd) GetPassword() string { + if c == nil || c.Password == nil { + return "" + } + return *c.Password +} + +// GetPort returns the Port field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsCollectd) GetPort() int { + if c == nil || c.Port == nil { + return 0 + } + return *c.Port +} + +// GetServer returns the Server field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsCollectd) GetServer() string { + if c == nil || c.Server == nil { + return "" + } + return *c.Server +} + +// GetUsername returns the Username field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsCollectd) GetUsername() string { + if c == nil || c.Username == nil { + return "" + } + return *c.Username +} + +// GetEmail returns the Email field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsCustomer) GetEmail() string { + if c == nil || c.Email == nil { + return "" + } + return *c.Email +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsCustomer) GetName() string { + if c == nil || c.Name == nil { + return "" + } + return *c.Name +} + +// GetPublicKeyData returns the PublicKeyData field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsCustomer) GetPublicKeyData() string { + if c == nil || c.PublicKeyData == nil { + return "" + } + return *c.PublicKeyData +} + +// GetSecret returns the Secret field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsCustomer) GetSecret() string { + if c == nil || c.Secret == nil { + return "" + } + return *c.Secret +} + +// GetUUID returns the UUID field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsCustomer) GetUUID() string { + if c == nil || c.UUID == nil { + return "" + } + return *c.UUID +} + +// GetClientID returns the ClientID field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsGithubOAuth) GetClientID() string { + if c == nil || c.ClientID == nil { + return "" + } + return *c.ClientID +} + +// GetClientSecret returns the ClientSecret field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsGithubOAuth) GetClientSecret() string { + if c == nil || c.ClientSecret == nil { + return "" + } + return *c.ClientSecret +} + +// GetOrganizationName returns the OrganizationName field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsGithubOAuth) GetOrganizationName() string { + if c == nil || c.OrganizationName == nil { + return "" + } + return *c.OrganizationName +} + +// GetOrganizationTeam returns the OrganizationTeam field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsGithubOAuth) GetOrganizationTeam() string { + if c == nil || c.OrganizationTeam == nil { + return "" + } + return *c.OrganizationTeam +} + +// GetCert returns the Cert field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsGithubSSL) GetCert() string { + if c == nil || c.Cert == nil { + return "" + } + return *c.Cert +} + +// GetEnabled returns the Enabled field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsGithubSSL) GetEnabled() bool { + if c == nil || c.Enabled == nil { + return false + } + return *c.Enabled +} + +// GetKey returns the Key field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsGithubSSL) GetKey() string { + if c == nil || c.Key == nil { + return "" + } + return *c.Key +} + +// GetAdminGroup returns the AdminGroup field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLDAP) GetAdminGroup() string { + if c == nil || c.AdminGroup == nil { + return "" + } + return *c.AdminGroup +} + +// GetBindDN returns the BindDN field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLDAP) GetBindDN() string { + if c == nil || c.BindDN == nil { + return "" + } + return *c.BindDN +} + +// GetHost returns the Host field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLDAP) GetHost() string { + if c == nil || c.Host == nil { + return "" + } + return *c.Host +} + +// GetMethod returns the Method field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLDAP) GetMethod() string { + if c == nil || c.Method == nil { + return "" + } + return *c.Method +} + +// GetPassword returns the Password field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLDAP) GetPassword() string { + if c == nil || c.Password == nil { + return "" + } + return *c.Password +} + +// GetPort returns the Port field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLDAP) GetPort() int { + if c == nil || c.Port == nil { + return 0 + } + return *c.Port +} + +// GetPosixSupport returns the PosixSupport field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLDAP) GetPosixSupport() bool { + if c == nil || c.PosixSupport == nil { + return false + } + return *c.PosixSupport +} + +// GetProfile returns the Profile field. +func (c *ConfigSettingsLDAP) GetProfile() *ConfigSettingsLDAPProfile { + if c == nil { + return nil + } + return c.Profile +} + +// GetReconciliation returns the Reconciliation field. +func (c *ConfigSettingsLDAP) GetReconciliation() *ConfigSettingsLDAPReconciliation { + if c == nil { + return nil + } + return c.Reconciliation +} + +// GetRecursiveGroupSearch returns the RecursiveGroupSearch field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLDAP) GetRecursiveGroupSearch() bool { + if c == nil || c.RecursiveGroupSearch == nil { + return false + } + return *c.RecursiveGroupSearch +} + +// GetSearchStrategy returns the SearchStrategy field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLDAP) GetSearchStrategy() string { + if c == nil || c.SearchStrategy == nil { + return "" + } + return *c.SearchStrategy +} + +// GetSyncEnabled returns the SyncEnabled field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLDAP) GetSyncEnabled() bool { + if c == nil || c.SyncEnabled == nil { + return false + } + return *c.SyncEnabled +} + +// GetTeamSyncInterval returns the TeamSyncInterval field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLDAP) GetTeamSyncInterval() int { + if c == nil || c.TeamSyncInterval == nil { + return 0 + } + return *c.TeamSyncInterval +} + +// GetUID returns the UID field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLDAP) GetUID() string { + if c == nil || c.UID == nil { + return "" + } + return *c.UID +} + +// GetUserSyncEmails returns the UserSyncEmails field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLDAP) GetUserSyncEmails() bool { + if c == nil || c.UserSyncEmails == nil { + return false + } + return *c.UserSyncEmails +} + +// GetUserSyncInterval returns the UserSyncInterval field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLDAP) GetUserSyncInterval() int { + if c == nil || c.UserSyncInterval == nil { + return 0 + } + return *c.UserSyncInterval +} + +// GetUserSyncKeys returns the UserSyncKeys field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLDAP) GetUserSyncKeys() bool { + if c == nil || c.UserSyncKeys == nil { + return false + } + return *c.UserSyncKeys +} + +// GetVirtualAttributeEnabled returns the VirtualAttributeEnabled field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLDAP) GetVirtualAttributeEnabled() bool { + if c == nil || c.VirtualAttributeEnabled == nil { + return false + } + return *c.VirtualAttributeEnabled +} + +// GetKey returns the Key field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLDAPProfile) GetKey() string { + if c == nil || c.Key == nil { + return "" + } + return *c.Key +} + +// GetMail returns the Mail field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLDAPProfile) GetMail() string { + if c == nil || c.Mail == nil { + return "" + } + return *c.Mail +} + +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLDAPProfile) GetName() string { + if c == nil || c.Name == nil { + return "" + } + return *c.Name +} + +// GetUID returns the UID field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLDAPProfile) GetUID() string { + if c == nil || c.UID == nil { + return "" + } + return *c.UID +} + +// GetOrg returns the Org field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLDAPReconciliation) GetOrg() string { + if c == nil || c.Org == nil { + return "" + } + return *c.Org +} + +// GetUser returns the User field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLDAPReconciliation) GetUser() string { + if c == nil || c.User == nil { + return "" + } + return *c.User +} + +// GetClusterSupport returns the ClusterSupport field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLicenseSettings) GetClusterSupport() bool { + if c == nil || c.ClusterSupport == nil { + return false + } + return *c.ClusterSupport +} + +// GetEvaluation returns the Evaluation field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLicenseSettings) GetEvaluation() bool { + if c == nil || c.Evaluation == nil { + return false + } + return *c.Evaluation +} + +// GetExpireAt returns the ExpireAt field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLicenseSettings) GetExpireAt() Timestamp { + if c == nil || c.ExpireAt == nil { + return Timestamp{} + } + return *c.ExpireAt +} + +// GetPerpetual returns the Perpetual field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLicenseSettings) GetPerpetual() bool { + if c == nil || c.Perpetual == nil { + return false + } + return *c.Perpetual +} + +// GetSeats returns the Seats field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLicenseSettings) GetSeats() int { + if c == nil || c.Seats == nil { + return 0 + } + return *c.Seats +} + +// GetSSHAllowed returns the SSHAllowed field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLicenseSettings) GetSSHAllowed() bool { + if c == nil || c.SSHAllowed == nil { + return false + } + return *c.SSHAllowed +} + +// GetSupportKey returns the SupportKey field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLicenseSettings) GetSupportKey() string { + if c == nil || c.SupportKey == nil { + return "" + } + return *c.SupportKey +} + +// GetUnlimitedSeating returns the UnlimitedSeating field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsLicenseSettings) GetUnlimitedSeating() bool { + if c == nil || c.UnlimitedSeating == nil { + return false + } + return *c.UnlimitedSeating +} + +// GetBasemap returns the Basemap field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsMapping) GetBasemap() string { + if c == nil || c.Basemap == nil { + return "" + } + return *c.Basemap +} + +// GetEnabled returns the Enabled field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsMapping) GetEnabled() bool { + if c == nil || c.Enabled == nil { + return false + } + return *c.Enabled +} + +// GetTileserver returns the Tileserver field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsMapping) GetTileserver() string { + if c == nil || c.Tileserver == nil { + return "" + } + return *c.Tileserver +} + +// GetToken returns the Token field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsMapping) GetToken() string { + if c == nil || c.Token == nil { + return "" + } + return *c.Token +} + +// GetPrimaryServer returns the PrimaryServer field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsNTP) GetPrimaryServer() string { + if c == nil || c.PrimaryServer == nil { + return "" + } + return *c.PrimaryServer +} + +// GetSecondaryServer returns the SecondaryServer field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsNTP) GetSecondaryServer() string { + if c == nil || c.SecondaryServer == nil { + return "" + } + return *c.SecondaryServer +} + +// GetEnabled returns the Enabled field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsPagesSettings) GetEnabled() bool { + if c == nil || c.Enabled == nil { + return false + } + return *c.Enabled +} + +// GetCertificate returns the Certificate field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSAML) GetCertificate() string { + if c == nil || c.Certificate == nil { + return "" + } + return *c.Certificate +} + +// GetCertificatePath returns the CertificatePath field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSAML) GetCertificatePath() string { + if c == nil || c.CertificatePath == nil { + return "" + } + return *c.CertificatePath +} + +// GetDisableAdminDemote returns the DisableAdminDemote field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSAML) GetDisableAdminDemote() bool { + if c == nil || c.DisableAdminDemote == nil { + return false + } + return *c.DisableAdminDemote +} + +// GetIDPInitiatedSSO returns the IDPInitiatedSSO field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSAML) GetIDPInitiatedSSO() bool { + if c == nil || c.IDPInitiatedSSO == nil { + return false + } + return *c.IDPInitiatedSSO +} + +// GetIssuer returns the Issuer field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSAML) GetIssuer() string { + if c == nil || c.Issuer == nil { + return "" + } + return *c.Issuer +} + +// GetSSOURL returns the SSOURL field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSAML) GetSSOURL() string { + if c == nil || c.SSOURL == nil { + return "" + } + return *c.SSOURL +} + +// GetAddress returns the Address field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSMTP) GetAddress() string { + if c == nil || c.Address == nil { + return "" + } + return *c.Address +} + +// GetAuthentication returns the Authentication field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSMTP) GetAuthentication() string { + if c == nil || c.Authentication == nil { + return "" + } + return *c.Authentication +} + +// GetDiscardToNoreplyAddress returns the DiscardToNoreplyAddress field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSMTP) GetDiscardToNoreplyAddress() bool { + if c == nil || c.DiscardToNoreplyAddress == nil { + return false + } + return *c.DiscardToNoreplyAddress +} + +// GetDomain returns the Domain field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSMTP) GetDomain() string { + if c == nil || c.Domain == nil { + return "" + } + return *c.Domain +} + +// GetEnabled returns the Enabled field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSMTP) GetEnabled() bool { + if c == nil || c.Enabled == nil { + return false + } + return *c.Enabled +} + +// GetEnableStarttlsAuto returns the EnableStarttlsAuto field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSMTP) GetEnableStarttlsAuto() bool { + if c == nil || c.EnableStarttlsAuto == nil { + return false + } + return *c.EnableStarttlsAuto +} + +// GetNoreplyAddress returns the NoreplyAddress field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSMTP) GetNoreplyAddress() string { + if c == nil || c.NoreplyAddress == nil { + return "" + } + return *c.NoreplyAddress +} + +// GetPassword returns the Password field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSMTP) GetPassword() string { + if c == nil || c.Password == nil { + return "" + } + return *c.Password +} + +// GetPort returns the Port field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSMTP) GetPort() string { + if c == nil || c.Port == nil { + return "" + } + return *c.Port +} + +// GetSupportAddress returns the SupportAddress field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSMTP) GetSupportAddress() string { + if c == nil || c.SupportAddress == nil { + return "" + } + return *c.SupportAddress +} + +// GetSupportAddressType returns the SupportAddressType field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSMTP) GetSupportAddressType() string { + if c == nil || c.SupportAddressType == nil { + return "" + } + return *c.SupportAddressType +} + +// GetUsername returns the Username field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSMTP) GetUsername() string { + if c == nil || c.Username == nil { + return "" + } + return *c.Username +} + +// GetUserName returns the UserName field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSMTP) GetUserName() string { + if c == nil || c.UserName == nil { + return "" + } + return *c.UserName +} + +// GetCommunity returns the Community field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSNMP) GetCommunity() string { + if c == nil || c.Community == nil { + return "" + } + return *c.Community +} + +// GetEnabled returns the Enabled field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSNMP) GetEnabled() bool { + if c == nil || c.Enabled == nil { + return false + } + return *c.Enabled +} + +// GetEnabled returns the Enabled field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSyslog) GetEnabled() bool { + if c == nil || c.Enabled == nil { + return false + } + return *c.Enabled +} + +// GetProtocolName returns the ProtocolName field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSyslog) GetProtocolName() string { + if c == nil || c.ProtocolName == nil { return "" } - return *c.Description + return *c.ProtocolName } -// GetDocumentation returns the Documentation field if it's non-nil, zero value otherwise. -func (c *CommunityHealthMetrics) GetDocumentation() string { - if c == nil || c.Documentation == nil { +// GetServer returns the Server field if it's non-nil, zero value otherwise. +func (c *ConfigSettingsSyslog) GetServer() string { + if c == nil || c.Server == nil { return "" } - return *c.Documentation + return *c.Server } -// GetFiles returns the Files field. -func (c *CommunityHealthMetrics) GetFiles() *CommunityHealthFiles { - if c == nil { - return nil +// GetName returns the Name field if it's non-nil, zero value otherwise. +func (c *ConnectionServiceItem) GetName() string { + if c == nil || c.Name == nil { + return "" } - return c.Files + return *c.Name } -// GetHealthPercentage returns the HealthPercentage field if it's non-nil, zero value otherwise. -func (c *CommunityHealthMetrics) GetHealthPercentage() int { - if c == nil || c.HealthPercentage == nil { +// GetNumber returns the Number field if it's non-nil, zero value otherwise. +func (c *ConnectionServiceItem) GetNumber() int { + if c == nil || c.Number == nil { return 0 } - return *c.HealthPercentage -} - -// GetUpdatedAt returns the UpdatedAt field if it's non-nil, zero value otherwise. -func (c *CommunityHealthMetrics) GetUpdatedAt() Timestamp { - if c == nil || c.UpdatedAt == nil { - return Timestamp{} - } - return *c.UpdatedAt + return *c.Number } // GetID returns the ID field if it's non-nil, zero value otherwise. @@ -11638,6 +12798,158 @@ func (l *License) GetURL() string { return *l.URL } +// GetStatus returns the Status field if it's non-nil, zero value otherwise. +func (l *LicenseCheck) GetStatus() string { + if l == nil || l.Status == nil { + return "" + } + return *l.Status +} + +// GetAdvancedSecurityEnabled returns the AdvancedSecurityEnabled field if it's non-nil, zero value otherwise. +func (l *LicenseStatus) GetAdvancedSecurityEnabled() bool { + if l == nil || l.AdvancedSecurityEnabled == nil { + return false + } + return *l.AdvancedSecurityEnabled +} + +// GetAdvancedSecuritySeats returns the AdvancedSecuritySeats field if it's non-nil, zero value otherwise. +func (l *LicenseStatus) GetAdvancedSecuritySeats() int { + if l == nil || l.AdvancedSecuritySeats == nil { + return 0 + } + return *l.AdvancedSecuritySeats +} + +// GetClusterSupport returns the ClusterSupport field if it's non-nil, zero value otherwise. +func (l *LicenseStatus) GetClusterSupport() bool { + if l == nil || l.ClusterSupport == nil { + return false + } + return *l.ClusterSupport +} + +// GetCompany returns the Company field if it's non-nil, zero value otherwise. +func (l *LicenseStatus) GetCompany() string { + if l == nil || l.Company == nil { + return "" + } + return *l.Company +} + +// GetCroquetSupport returns the CroquetSupport field if it's non-nil, zero value otherwise. +func (l *LicenseStatus) GetCroquetSupport() bool { + if l == nil || l.CroquetSupport == nil { + return false + } + return *l.CroquetSupport +} + +// GetCustomTerms returns the CustomTerms field if it's non-nil, zero value otherwise. +func (l *LicenseStatus) GetCustomTerms() bool { + if l == nil || l.CustomTerms == nil { + return false + } + return *l.CustomTerms +} + +// GetEvaluation returns the Evaluation field if it's non-nil, zero value otherwise. +func (l *LicenseStatus) GetEvaluation() bool { + if l == nil || l.Evaluation == nil { + return false + } + return *l.Evaluation +} + +// GetExpireAt returns the ExpireAt field if it's non-nil, zero value otherwise. +func (l *LicenseStatus) GetExpireAt() Timestamp { + if l == nil || l.ExpireAt == nil { + return Timestamp{} + } + return *l.ExpireAt +} + +// GetInsightsEnabled returns the InsightsEnabled field if it's non-nil, zero value otherwise. +func (l *LicenseStatus) GetInsightsEnabled() bool { + if l == nil || l.InsightsEnabled == nil { + return false + } + return *l.InsightsEnabled +} + +// GetInsightsExpireAt returns the InsightsExpireAt field if it's non-nil, zero value otherwise. +func (l *LicenseStatus) GetInsightsExpireAt() Timestamp { + if l == nil || l.InsightsExpireAt == nil { + return Timestamp{} + } + return *l.InsightsExpireAt +} + +// GetLearningLabEvaluationExpires returns the LearningLabEvaluationExpires field if it's non-nil, zero value otherwise. +func (l *LicenseStatus) GetLearningLabEvaluationExpires() Timestamp { + if l == nil || l.LearningLabEvaluationExpires == nil { + return Timestamp{} + } + return *l.LearningLabEvaluationExpires +} + +// GetLearningLabSeats returns the LearningLabSeats field if it's non-nil, zero value otherwise. +func (l *LicenseStatus) GetLearningLabSeats() int { + if l == nil || l.LearningLabSeats == nil { + return 0 + } + return *l.LearningLabSeats +} + +// GetPerpetual returns the Perpetual field if it's non-nil, zero value otherwise. +func (l *LicenseStatus) GetPerpetual() bool { + if l == nil || l.Perpetual == nil { + return false + } + return *l.Perpetual +} + +// GetReferenceNumber returns the ReferenceNumber field if it's non-nil, zero value otherwise. +func (l *LicenseStatus) GetReferenceNumber() string { + if l == nil || l.ReferenceNumber == nil { + return "" + } + return *l.ReferenceNumber +} + +// GetSeats returns the Seats field if it's non-nil, zero value otherwise. +func (l *LicenseStatus) GetSeats() int { + if l == nil || l.Seats == nil { + return 0 + } + return *l.Seats +} + +// GetSSHAllowed returns the SSHAllowed field if it's non-nil, zero value otherwise. +func (l *LicenseStatus) GetSSHAllowed() bool { + if l == nil || l.SSHAllowed == nil { + return false + } + return *l.SSHAllowed +} + +// GetSupportKey returns the SupportKey field if it's non-nil, zero value otherwise. +func (l *LicenseStatus) GetSupportKey() string { + if l == nil || l.SupportKey == nil { + return "" + } + return *l.SupportKey +} + +// GetUnlimitedSeating returns the UnlimitedSeating field if it's non-nil, zero value otherwise. +func (l *LicenseStatus) GetUnlimitedSeating() bool { + if l == nil || l.UnlimitedSeating == nil { + return false + } + return *l.UnlimitedSeating +} + // GetFrom returns the From field if it's non-nil, zero value otherwise. func (l *LinearHistoryRequirementEnforcementLevelChanges) GetFrom() string { if l == nil || l.From == nil { @@ -11982,6 +13294,102 @@ func (l *LockBranch) GetEnabled() bool { return *l.Enabled } +// GetHostname returns the Hostname field if it's non-nil, zero value otherwise. +func (m *MaintenanceOperationStatus) GetHostname() string { + if m == nil || m.Hostname == nil { + return "" + } + return *m.Hostname +} + +// GetMessage returns the Message field if it's non-nil, zero value otherwise. +func (m *MaintenanceOperationStatus) GetMessage() string { + if m == nil || m.Message == nil { + return "" + } + return *m.Message +} + +// GetUUID returns the UUID field if it's non-nil, zero value otherwise. +func (m *MaintenanceOperationStatus) GetUUID() string { + if m == nil || m.UUID == nil { + return "" + } + return *m.UUID +} + +// GetMaintenanceModeMessage returns the MaintenanceModeMessage field if it's non-nil, zero value otherwise. +func (m *MaintenanceOptions) GetMaintenanceModeMessage() string { + if m == nil || m.MaintenanceModeMessage == nil { + return "" + } + return *m.MaintenanceModeMessage +} + +// GetUUID returns the UUID field if it's non-nil, zero value otherwise. +func (m *MaintenanceOptions) GetUUID() string { + if m == nil || m.UUID == nil { + return "" + } + return *m.UUID +} + +// GetWhen returns the When field if it's non-nil, zero value otherwise. +func (m *MaintenanceOptions) GetWhen() string { + if m == nil || m.When == nil { + return "" + } + return *m.When +} + +// GetCanUnsetMaintenance returns the CanUnsetMaintenance field if it's non-nil, zero value otherwise. +func (m *MaintenanceStatus) GetCanUnsetMaintenance() bool { + if m == nil || m.CanUnsetMaintenance == nil { + return false + } + return *m.CanUnsetMaintenance +} + +// GetHostname returns the Hostname field if it's non-nil, zero value otherwise. +func (m *MaintenanceStatus) GetHostname() string { + if m == nil || m.Hostname == nil { + return "" + } + return *m.Hostname +} + +// GetMaintenanceModeMessage returns the MaintenanceModeMessage field if it's non-nil, zero value otherwise. +func (m *MaintenanceStatus) GetMaintenanceModeMessage() string { + if m == nil || m.MaintenanceModeMessage == nil { + return "" + } + return *m.MaintenanceModeMessage +} + +// GetScheduledTime returns the ScheduledTime field if it's non-nil, zero value otherwise. +func (m *MaintenanceStatus) GetScheduledTime() Timestamp { + if m == nil || m.ScheduledTime == nil { + return Timestamp{} + } + return *m.ScheduledTime +} + +// GetStatus returns the Status field if it's non-nil, zero value otherwise. +func (m *MaintenanceStatus) GetStatus() string { + if m == nil || m.Status == nil { + return "" + } + return *m.Status +} + +// GetUUID returns the UUID field if it's non-nil, zero value otherwise. +func (m *MaintenanceStatus) GetUUID() string { + if m == nil || m.UUID == nil { + return "" + } + return *m.UUID +} + // GetEffectiveDate returns the EffectiveDate field if it's non-nil, zero value otherwise. func (m *MarketplacePendingChange) GetEffectiveDate() Timestamp { if m == nil || m.EffectiveDate == nil { @@ -13222,6 +14630,62 @@ func (n *NewTeam) GetPrivacy() string { return *n.Privacy } +// GetHostname returns the Hostname field if it's non-nil, zero value otherwise. +func (n *NodeDetails) GetHostname() string { + if n == nil || n.Hostname == nil { + return "" + } + return *n.Hostname +} + +// GetUUID returns the UUID field if it's non-nil, zero value otherwise. +func (n *NodeDetails) GetUUID() string { + if n == nil || n.UUID == nil { + return "" + } + return *n.UUID +} + +// GetTopology returns the Topology field if it's non-nil, zero value otherwise. +func (n *NodeMetadataStatus) GetTopology() string { + if n == nil || n.Topology == nil { + return "" + } + return *n.Topology +} + +// GetClusterRoles returns the ClusterRoles field if it's non-nil, zero value otherwise. +func (n *NodeQueryOptions) GetClusterRoles() string { + if n == nil || n.ClusterRoles == nil { + return "" + } + return *n.ClusterRoles +} + +// GetUUID returns the UUID field if it's non-nil, zero value otherwise. +func (n *NodeQueryOptions) GetUUID() string { + if n == nil || n.UUID == nil { + return "" + } + return *n.UUID +} + +// GetHostname returns the Hostname field if it's non-nil, zero value otherwise. +func (n *NodeReleaseVersion) GetHostname() string { + if n == nil || n.Hostname == nil { + return "" + } + return *n.Hostname +} + +// GetVersion returns the Version field. +func (n *NodeReleaseVersion) GetVersion() *ReleaseVersion { + if n == nil { + return nil + } + return n.Version +} + // GetID returns the ID field if it's non-nil, zero value otherwise. func (n *Notification) GetID() string { if n == nil || n.ID == nil { @@ -18846,6 +20310,38 @@ func (r *ReleaseEvent) GetSender() *User { return r.Sender } +// GetBuildDate returns the BuildDate field if it's non-nil, zero value otherwise. +func (r *ReleaseVersion) GetBuildDate() string { + if r == nil || r.BuildDate == nil { + return "" + } + return *r.BuildDate +} + +// GetBuildID returns the BuildID field if it's non-nil, zero value otherwise. +func (r *ReleaseVersion) GetBuildID() string { + if r == nil || r.BuildID == nil { + return "" + } + return *r.BuildID +} + +// GetPlatform returns the Platform field if it's non-nil, zero value otherwise. +func (r *ReleaseVersion) GetPlatform() string { + if r == nil || r.Platform == nil { + return "" + } + return *r.Platform +} + +// GetVersion returns the Version field if it's non-nil, zero value otherwise. +func (r *ReleaseVersion) GetVersion() string { + if r == nil || r.Version == nil { + return "" + } + return *r.Version +} + // GetExpiresAt returns the ExpiresAt field if it's non-nil, zero value otherwise. func (r *RemoveToken) GetExpiresAt() Timestamp { if r == nil || r.ExpiresAt == nil { @@ -23566,6 +25062,38 @@ func (s *SponsorshipTier) GetFrom() string { return *s.From } +// GetHostname returns the Hostname field if it's non-nil, zero value otherwise. +func (s *SSHKeyStatus) GetHostname() string { + if s == nil || s.Hostname == nil { + return "" + } + return *s.Hostname +} + +// GetMessage returns the Message field if it's non-nil, zero value otherwise. +func (s *SSHKeyStatus) GetMessage() string { + if s == nil || s.Message == nil { + return "" + } + return *s.Message +} + +// GetModified returns the Modified field if it's non-nil, zero value otherwise. +func (s *SSHKeyStatus) GetModified() bool { + if s == nil || s.Modified == nil { + return false + } + return *s.Modified +} + +// GetUUID returns the UUID field if it's non-nil, zero value otherwise. +func (s *SSHKeyStatus) GetUUID() string { + if s == nil || s.UUID == nil { + return "" + } + return *s.UUID +} + // GetCreatedAt returns the CreatedAt field if it's non-nil, zero value otherwise. func (s *SSHSigningKey) GetCreatedAt() Timestamp { if s == nil || s.CreatedAt == nil { @@ -23846,6 +25374,46 @@ func (s *Subscription) GetURL() string { return *s.URL } +// GetStatus returns the Status field if it's non-nil, zero value otherwise. +func (s *SystemRequirements) GetStatus() string { + if s == nil || s.Status == nil { + return "" + } + return *s.Status +} + +// GetHostname returns the Hostname field if it's non-nil, zero value otherwise. +func (s *SystemRequirementsNode) GetHostname() string { + if s == nil || s.Hostname == nil { + return "" + } + return *s.Hostname +} + +// GetStatus returns the Status field if it's non-nil, zero value otherwise. +func (s *SystemRequirementsNode) GetStatus() string { + if s == nil || s.Status == nil { + return "" + } + return *s.Status +} + +// GetRole returns the Role field if it's non-nil, zero value otherwise. +func (s *SystemRequirementsNodeRoleStatus) GetRole() string { + if s == nil || s.Role == nil { + return "" + } + return *s.Role +} + +// GetStatus returns the Status field if it's non-nil, zero value otherwise. +func (s *SystemRequirementsNodeRoleStatus) GetStatus() string { + if s == nil || s.Status == nil { + return "" + } + return *s.Status +} + // GetMessage returns the Message field if it's non-nil, zero value otherwise. func (t *Tag) GetMessage() string { if t == nil || t.Message == nil { diff --git a/github/github-accessors_test.go b/github/github-accessors_test.go index dca95aba16e..1f02d7cff34 100644 --- a/github/github-accessors_test.go +++ b/github/github-accessors_test.go @@ -3195,6 +3195,94 @@ func TestCheckSuitePreferenceResults_GetRepository(tt *testing.T) { c.GetRepository() } +func TestClusterSSHKey_GetFingerprint(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ClusterSSHKey{Fingerprint: &zeroValue} + c.GetFingerprint() + c = &ClusterSSHKey{} + c.GetFingerprint() + c = nil + c.GetFingerprint() +} + +func TestClusterSSHKey_GetKey(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ClusterSSHKey{Key: &zeroValue} + c.GetKey() + c = &ClusterSSHKey{} + c.GetKey() + c = nil + c.GetKey() +} + +func TestClusterStatus_GetStatus(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ClusterStatus{Status: &zeroValue} + c.GetStatus() + c = &ClusterStatus{} + c.GetStatus() + c = nil + c.GetStatus() +} + +func TestClusterStatusNode_GetHostname(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ClusterStatusNode{Hostname: &zeroValue} + c.GetHostname() + c = &ClusterStatusNode{} + c.GetHostname() + c = nil + c.GetHostname() +} + +func TestClusterStatusNode_GetStatus(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ClusterStatusNode{Status: &zeroValue} + c.GetStatus() + c = &ClusterStatusNode{} + c.GetStatus() + c = nil + c.GetStatus() +} + +func TestClusterStatusNodeServiceItem_GetDetails(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ClusterStatusNodeServiceItem{Details: &zeroValue} + c.GetDetails() + c = &ClusterStatusNodeServiceItem{} + c.GetDetails() + c = nil + c.GetDetails() +} + +func TestClusterStatusNodeServiceItem_GetName(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ClusterStatusNodeServiceItem{Name: &zeroValue} + c.GetName() + c = &ClusterStatusNodeServiceItem{} + c.GetName() + c = nil + c.GetName() +} + +func TestClusterStatusNodeServiceItem_GetStatus(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ClusterStatusNodeServiceItem{Status: &zeroValue} + c.GetStatus() + c = &ClusterStatusNodeServiceItem{} + c.GetStatus() + c = nil + c.GetStatus() +} + func TestCodeOfConduct_GetBody(tt *testing.T) { tt.Parallel() var zeroValue string @@ -5086,148 +5174,1604 @@ func TestCommitStats_GetAdditions(tt *testing.T) { c = &CommitStats{} c.GetAdditions() c = nil - c.GetAdditions() + c.GetAdditions() +} + +func TestCommitStats_GetDeletions(tt *testing.T) { + tt.Parallel() + var zeroValue int + c := &CommitStats{Deletions: &zeroValue} + c.GetDeletions() + c = &CommitStats{} + c.GetDeletions() + c = nil + c.GetDeletions() +} + +func TestCommitStats_GetTotal(tt *testing.T) { + tt.Parallel() + var zeroValue int + c := &CommitStats{Total: &zeroValue} + c.GetTotal() + c = &CommitStats{} + c.GetTotal() + c = nil + c.GetTotal() +} + +func TestCommunityHealthFiles_GetCodeOfConduct(tt *testing.T) { + tt.Parallel() + c := &CommunityHealthFiles{} + c.GetCodeOfConduct() + c = nil + c.GetCodeOfConduct() +} + +func TestCommunityHealthFiles_GetCodeOfConductFile(tt *testing.T) { + tt.Parallel() + c := &CommunityHealthFiles{} + c.GetCodeOfConductFile() + c = nil + c.GetCodeOfConductFile() +} + +func TestCommunityHealthFiles_GetContributing(tt *testing.T) { + tt.Parallel() + c := &CommunityHealthFiles{} + c.GetContributing() + c = nil + c.GetContributing() +} + +func TestCommunityHealthFiles_GetIssueTemplate(tt *testing.T) { + tt.Parallel() + c := &CommunityHealthFiles{} + c.GetIssueTemplate() + c = nil + c.GetIssueTemplate() +} + +func TestCommunityHealthFiles_GetLicense(tt *testing.T) { + tt.Parallel() + c := &CommunityHealthFiles{} + c.GetLicense() + c = nil + c.GetLicense() +} + +func TestCommunityHealthFiles_GetPullRequestTemplate(tt *testing.T) { + tt.Parallel() + c := &CommunityHealthFiles{} + c.GetPullRequestTemplate() + c = nil + c.GetPullRequestTemplate() +} + +func TestCommunityHealthFiles_GetReadme(tt *testing.T) { + tt.Parallel() + c := &CommunityHealthFiles{} + c.GetReadme() + c = nil + c.GetReadme() +} + +func TestCommunityHealthMetrics_GetContentReportsEnabled(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &CommunityHealthMetrics{ContentReportsEnabled: &zeroValue} + c.GetContentReportsEnabled() + c = &CommunityHealthMetrics{} + c.GetContentReportsEnabled() + c = nil + c.GetContentReportsEnabled() +} + +func TestCommunityHealthMetrics_GetDescription(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &CommunityHealthMetrics{Description: &zeroValue} + c.GetDescription() + c = &CommunityHealthMetrics{} + c.GetDescription() + c = nil + c.GetDescription() +} + +func TestCommunityHealthMetrics_GetDocumentation(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &CommunityHealthMetrics{Documentation: &zeroValue} + c.GetDocumentation() + c = &CommunityHealthMetrics{} + c.GetDocumentation() + c = nil + c.GetDocumentation() +} + +func TestCommunityHealthMetrics_GetFiles(tt *testing.T) { + tt.Parallel() + c := &CommunityHealthMetrics{} + c.GetFiles() + c = nil + c.GetFiles() +} + +func TestCommunityHealthMetrics_GetHealthPercentage(tt *testing.T) { + tt.Parallel() + var zeroValue int + c := &CommunityHealthMetrics{HealthPercentage: &zeroValue} + c.GetHealthPercentage() + c = &CommunityHealthMetrics{} + c.GetHealthPercentage() + c = nil + c.GetHealthPercentage() +} + +func TestCommunityHealthMetrics_GetUpdatedAt(tt *testing.T) { + tt.Parallel() + var zeroValue Timestamp + c := &CommunityHealthMetrics{UpdatedAt: &zeroValue} + c.GetUpdatedAt() + c = &CommunityHealthMetrics{} + c.GetUpdatedAt() + c = nil + c.GetUpdatedAt() +} + +func TestConfigApplyEventsNode_GetLastRequestID(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigApplyEventsNode{LastRequestID: &zeroValue} + c.GetLastRequestID() + c = &ConfigApplyEventsNode{} + c.GetLastRequestID() + c = nil + c.GetLastRequestID() +} + +func TestConfigApplyEventsNode_GetNode(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigApplyEventsNode{Node: &zeroValue} + c.GetNode() + c = &ConfigApplyEventsNode{} + c.GetNode() + c = nil + c.GetNode() +} + +func TestConfigApplyEventsNodeEvent_GetBody(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigApplyEventsNodeEvent{Body: &zeroValue} + c.GetBody() + c = &ConfigApplyEventsNodeEvent{} + c.GetBody() + c = nil + c.GetBody() +} + +func TestConfigApplyEventsNodeEvent_GetConfigRunID(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigApplyEventsNodeEvent{ConfigRunID: &zeroValue} + c.GetConfigRunID() + c = &ConfigApplyEventsNodeEvent{} + c.GetConfigRunID() + c = nil + c.GetConfigRunID() +} + +func TestConfigApplyEventsNodeEvent_GetEventName(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigApplyEventsNodeEvent{EventName: &zeroValue} + c.GetEventName() + c = &ConfigApplyEventsNodeEvent{} + c.GetEventName() + c = nil + c.GetEventName() +} + +func TestConfigApplyEventsNodeEvent_GetHostname(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigApplyEventsNodeEvent{Hostname: &zeroValue} + c.GetHostname() + c = &ConfigApplyEventsNodeEvent{} + c.GetHostname() + c = nil + c.GetHostname() +} + +func TestConfigApplyEventsNodeEvent_GetSeverityText(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigApplyEventsNodeEvent{SeverityText: &zeroValue} + c.GetSeverityText() + c = &ConfigApplyEventsNodeEvent{} + c.GetSeverityText() + c = nil + c.GetSeverityText() +} + +func TestConfigApplyEventsNodeEvent_GetSpanDepth(tt *testing.T) { + tt.Parallel() + var zeroValue int + c := &ConfigApplyEventsNodeEvent{SpanDepth: &zeroValue} + c.GetSpanDepth() + c = &ConfigApplyEventsNodeEvent{} + c.GetSpanDepth() + c = nil + c.GetSpanDepth() +} + +func TestConfigApplyEventsNodeEvent_GetSpanID(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigApplyEventsNodeEvent{SpanID: &zeroValue} + c.GetSpanID() + c = &ConfigApplyEventsNodeEvent{} + c.GetSpanID() + c = nil + c.GetSpanID() +} + +func TestConfigApplyEventsNodeEvent_GetSpanParentID(tt *testing.T) { + tt.Parallel() + var zeroValue int64 + c := &ConfigApplyEventsNodeEvent{SpanParentID: &zeroValue} + c.GetSpanParentID() + c = &ConfigApplyEventsNodeEvent{} + c.GetSpanParentID() + c = nil + c.GetSpanParentID() +} + +func TestConfigApplyEventsNodeEvent_GetTimestamp(tt *testing.T) { + tt.Parallel() + var zeroValue Timestamp + c := &ConfigApplyEventsNodeEvent{Timestamp: &zeroValue} + c.GetTimestamp() + c = &ConfigApplyEventsNodeEvent{} + c.GetTimestamp() + c = nil + c.GetTimestamp() +} + +func TestConfigApplyEventsNodeEvent_GetTopology(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigApplyEventsNodeEvent{Topology: &zeroValue} + c.GetTopology() + c = &ConfigApplyEventsNodeEvent{} + c.GetTopology() + c = nil + c.GetTopology() +} + +func TestConfigApplyEventsNodeEvent_GetTraceID(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigApplyEventsNodeEvent{TraceID: &zeroValue} + c.GetTraceID() + c = &ConfigApplyEventsNodeEvent{} + c.GetTraceID() + c = nil + c.GetTraceID() +} + +func TestConfigApplyEventsOptions_GetLastRequestID(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigApplyEventsOptions{LastRequestID: &zeroValue} + c.GetLastRequestID() + c = &ConfigApplyEventsOptions{} + c.GetLastRequestID() + c = nil + c.GetLastRequestID() +} + +func TestConfigApplyOptions_GetRunID(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigApplyOptions{RunID: &zeroValue} + c.GetRunID() + c = &ConfigApplyOptions{} + c.GetRunID() + c = nil + c.GetRunID() +} + +func TestConfigApplyStatus_GetRunning(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigApplyStatus{Running: &zeroValue} + c.GetRunning() + c = &ConfigApplyStatus{} + c.GetRunning() + c = nil + c.GetRunning() +} + +func TestConfigApplyStatus_GetSuccessful(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigApplyStatus{Successful: &zeroValue} + c.GetSuccessful() + c = &ConfigApplyStatus{} + c.GetSuccessful() + c = nil + c.GetSuccessful() +} + +func TestConfigApplyStatusNode_GetHostname(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigApplyStatusNode{Hostname: &zeroValue} + c.GetHostname() + c = &ConfigApplyStatusNode{} + c.GetHostname() + c = nil + c.GetHostname() +} + +func TestConfigApplyStatusNode_GetRunID(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigApplyStatusNode{RunID: &zeroValue} + c.GetRunID() + c = &ConfigApplyStatusNode{} + c.GetRunID() + c = nil + c.GetRunID() +} + +func TestConfigApplyStatusNode_GetRunning(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigApplyStatusNode{Running: &zeroValue} + c.GetRunning() + c = &ConfigApplyStatusNode{} + c.GetRunning() + c = nil + c.GetRunning() +} + +func TestConfigApplyStatusNode_GetSuccessful(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigApplyStatusNode{Successful: &zeroValue} + c.GetSuccessful() + c = &ConfigApplyStatusNode{} + c.GetSuccessful() + c = nil + c.GetSuccessful() +} + +func TestConfigSettings_GetAdminPassword(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettings{AdminPassword: &zeroValue} + c.GetAdminPassword() + c = &ConfigSettings{} + c.GetAdminPassword() + c = nil + c.GetAdminPassword() +} + +func TestConfigSettings_GetAssets(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettings{Assets: &zeroValue} + c.GetAssets() + c = &ConfigSettings{} + c.GetAssets() + c = nil + c.GetAssets() +} + +func TestConfigSettings_GetAuthMode(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettings{AuthMode: &zeroValue} + c.GetAuthMode() + c = &ConfigSettings{} + c.GetAuthMode() + c = nil + c.GetAuthMode() +} + +func TestConfigSettings_GetAvatar(tt *testing.T) { + tt.Parallel() + c := &ConfigSettings{} + c.GetAvatar() + c = nil + c.GetAvatar() +} + +func TestConfigSettings_GetCAS(tt *testing.T) { + tt.Parallel() + c := &ConfigSettings{} + c.GetCAS() + c = nil + c.GetCAS() +} + +func TestConfigSettings_GetCollectd(tt *testing.T) { + tt.Parallel() + c := &ConfigSettings{} + c.GetCollectd() + c = nil + c.GetCollectd() +} + +func TestConfigSettings_GetConfigurationID(tt *testing.T) { + tt.Parallel() + var zeroValue int64 + c := &ConfigSettings{ConfigurationID: &zeroValue} + c.GetConfigurationID() + c = &ConfigSettings{} + c.GetConfigurationID() + c = nil + c.GetConfigurationID() +} + +func TestConfigSettings_GetConfigurationRunCount(tt *testing.T) { + tt.Parallel() + var zeroValue int + c := &ConfigSettings{ConfigurationRunCount: &zeroValue} + c.GetConfigurationRunCount() + c = &ConfigSettings{} + c.GetConfigurationRunCount() + c = nil + c.GetConfigurationRunCount() +} + +func TestConfigSettings_GetCustomer(tt *testing.T) { + tt.Parallel() + c := &ConfigSettings{} + c.GetCustomer() + c = nil + c.GetCustomer() +} + +func TestConfigSettings_GetExpireSessions(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettings{ExpireSessions: &zeroValue} + c.GetExpireSessions() + c = &ConfigSettings{} + c.GetExpireSessions() + c = nil + c.GetExpireSessions() +} + +func TestConfigSettings_GetGithubHostname(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettings{GithubHostname: &zeroValue} + c.GetGithubHostname() + c = &ConfigSettings{} + c.GetGithubHostname() + c = nil + c.GetGithubHostname() +} + +func TestConfigSettings_GetGithubOAuth(tt *testing.T) { + tt.Parallel() + c := &ConfigSettings{} + c.GetGithubOAuth() + c = nil + c.GetGithubOAuth() +} + +func TestConfigSettings_GetGithubSSL(tt *testing.T) { + tt.Parallel() + c := &ConfigSettings{} + c.GetGithubSSL() + c = nil + c.GetGithubSSL() +} + +func TestConfigSettings_GetHTTPProxy(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettings{HTTPProxy: &zeroValue} + c.GetHTTPProxy() + c = &ConfigSettings{} + c.GetHTTPProxy() + c = nil + c.GetHTTPProxy() +} + +func TestConfigSettings_GetIdenticonsHost(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettings{IdenticonsHost: &zeroValue} + c.GetIdenticonsHost() + c = &ConfigSettings{} + c.GetIdenticonsHost() + c = nil + c.GetIdenticonsHost() +} + +func TestConfigSettings_GetLDAP(tt *testing.T) { + tt.Parallel() + c := &ConfigSettings{} + c.GetLDAP() + c = nil + c.GetLDAP() +} + +func TestConfigSettings_GetLicense(tt *testing.T) { + tt.Parallel() + c := &ConfigSettings{} + c.GetLicense() + c = nil + c.GetLicense() +} + +func TestConfigSettings_GetLoadBalancer(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettings{LoadBalancer: &zeroValue} + c.GetLoadBalancer() + c = &ConfigSettings{} + c.GetLoadBalancer() + c = nil + c.GetLoadBalancer() +} + +func TestConfigSettings_GetMapping(tt *testing.T) { + tt.Parallel() + c := &ConfigSettings{} + c.GetMapping() + c = nil + c.GetMapping() +} + +func TestConfigSettings_GetNTP(tt *testing.T) { + tt.Parallel() + c := &ConfigSettings{} + c.GetNTP() + c = nil + c.GetNTP() +} + +func TestConfigSettings_GetPages(tt *testing.T) { + tt.Parallel() + c := &ConfigSettings{} + c.GetPages() + c = nil + c.GetPages() +} + +func TestConfigSettings_GetPrivateMode(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettings{PrivateMode: &zeroValue} + c.GetPrivateMode() + c = &ConfigSettings{} + c.GetPrivateMode() + c = nil + c.GetPrivateMode() +} + +func TestConfigSettings_GetPublicPages(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettings{PublicPages: &zeroValue} + c.GetPublicPages() + c = &ConfigSettings{} + c.GetPublicPages() + c = nil + c.GetPublicPages() +} + +func TestConfigSettings_GetSAML(tt *testing.T) { + tt.Parallel() + c := &ConfigSettings{} + c.GetSAML() + c = nil + c.GetSAML() +} + +func TestConfigSettings_GetSignupEnabled(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettings{SignupEnabled: &zeroValue} + c.GetSignupEnabled() + c = &ConfigSettings{} + c.GetSignupEnabled() + c = nil + c.GetSignupEnabled() +} + +func TestConfigSettings_GetSMTP(tt *testing.T) { + tt.Parallel() + c := &ConfigSettings{} + c.GetSMTP() + c = nil + c.GetSMTP() +} + +func TestConfigSettings_GetSNMP(tt *testing.T) { + tt.Parallel() + c := &ConfigSettings{} + c.GetSNMP() + c = nil + c.GetSNMP() +} + +func TestConfigSettings_GetSubdomainIsolation(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettings{SubdomainIsolation: &zeroValue} + c.GetSubdomainIsolation() + c = &ConfigSettings{} + c.GetSubdomainIsolation() + c = nil + c.GetSubdomainIsolation() +} + +func TestConfigSettings_GetSyslog(tt *testing.T) { + tt.Parallel() + c := &ConfigSettings{} + c.GetSyslog() + c = nil + c.GetSyslog() +} + +func TestConfigSettings_GetTimezone(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettings{Timezone: &zeroValue} + c.GetTimezone() + c = &ConfigSettings{} + c.GetTimezone() + c = nil + c.GetTimezone() +} + +func TestConfigSettingsAvatar_GetEnabled(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettingsAvatar{Enabled: &zeroValue} + c.GetEnabled() + c = &ConfigSettingsAvatar{} + c.GetEnabled() + c = nil + c.GetEnabled() +} + +func TestConfigSettingsAvatar_GetURI(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsAvatar{URI: &zeroValue} + c.GetURI() + c = &ConfigSettingsAvatar{} + c.GetURI() + c = nil + c.GetURI() +} + +func TestConfigSettingsCAS_GetURL(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsCAS{URL: &zeroValue} + c.GetURL() + c = &ConfigSettingsCAS{} + c.GetURL() + c = nil + c.GetURL() +} + +func TestConfigSettingsCollectd_GetEnabled(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettingsCollectd{Enabled: &zeroValue} + c.GetEnabled() + c = &ConfigSettingsCollectd{} + c.GetEnabled() + c = nil + c.GetEnabled() +} + +func TestConfigSettingsCollectd_GetEncryption(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsCollectd{Encryption: &zeroValue} + c.GetEncryption() + c = &ConfigSettingsCollectd{} + c.GetEncryption() + c = nil + c.GetEncryption() +} + +func TestConfigSettingsCollectd_GetPassword(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsCollectd{Password: &zeroValue} + c.GetPassword() + c = &ConfigSettingsCollectd{} + c.GetPassword() + c = nil + c.GetPassword() +} + +func TestConfigSettingsCollectd_GetPort(tt *testing.T) { + tt.Parallel() + var zeroValue int + c := &ConfigSettingsCollectd{Port: &zeroValue} + c.GetPort() + c = &ConfigSettingsCollectd{} + c.GetPort() + c = nil + c.GetPort() +} + +func TestConfigSettingsCollectd_GetServer(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsCollectd{Server: &zeroValue} + c.GetServer() + c = &ConfigSettingsCollectd{} + c.GetServer() + c = nil + c.GetServer() +} + +func TestConfigSettingsCollectd_GetUsername(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsCollectd{Username: &zeroValue} + c.GetUsername() + c = &ConfigSettingsCollectd{} + c.GetUsername() + c = nil + c.GetUsername() +} + +func TestConfigSettingsCustomer_GetEmail(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsCustomer{Email: &zeroValue} + c.GetEmail() + c = &ConfigSettingsCustomer{} + c.GetEmail() + c = nil + c.GetEmail() +} + +func TestConfigSettingsCustomer_GetName(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsCustomer{Name: &zeroValue} + c.GetName() + c = &ConfigSettingsCustomer{} + c.GetName() + c = nil + c.GetName() +} + +func TestConfigSettingsCustomer_GetPublicKeyData(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsCustomer{PublicKeyData: &zeroValue} + c.GetPublicKeyData() + c = &ConfigSettingsCustomer{} + c.GetPublicKeyData() + c = nil + c.GetPublicKeyData() +} + +func TestConfigSettingsCustomer_GetSecret(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsCustomer{Secret: &zeroValue} + c.GetSecret() + c = &ConfigSettingsCustomer{} + c.GetSecret() + c = nil + c.GetSecret() +} + +func TestConfigSettingsCustomer_GetUUID(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsCustomer{UUID: &zeroValue} + c.GetUUID() + c = &ConfigSettingsCustomer{} + c.GetUUID() + c = nil + c.GetUUID() +} + +func TestConfigSettingsGithubOAuth_GetClientID(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsGithubOAuth{ClientID: &zeroValue} + c.GetClientID() + c = &ConfigSettingsGithubOAuth{} + c.GetClientID() + c = nil + c.GetClientID() +} + +func TestConfigSettingsGithubOAuth_GetClientSecret(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsGithubOAuth{ClientSecret: &zeroValue} + c.GetClientSecret() + c = &ConfigSettingsGithubOAuth{} + c.GetClientSecret() + c = nil + c.GetClientSecret() +} + +func TestConfigSettingsGithubOAuth_GetOrganizationName(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsGithubOAuth{OrganizationName: &zeroValue} + c.GetOrganizationName() + c = &ConfigSettingsGithubOAuth{} + c.GetOrganizationName() + c = nil + c.GetOrganizationName() +} + +func TestConfigSettingsGithubOAuth_GetOrganizationTeam(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsGithubOAuth{OrganizationTeam: &zeroValue} + c.GetOrganizationTeam() + c = &ConfigSettingsGithubOAuth{} + c.GetOrganizationTeam() + c = nil + c.GetOrganizationTeam() +} + +func TestConfigSettingsGithubSSL_GetCert(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsGithubSSL{Cert: &zeroValue} + c.GetCert() + c = &ConfigSettingsGithubSSL{} + c.GetCert() + c = nil + c.GetCert() +} + +func TestConfigSettingsGithubSSL_GetEnabled(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettingsGithubSSL{Enabled: &zeroValue} + c.GetEnabled() + c = &ConfigSettingsGithubSSL{} + c.GetEnabled() + c = nil + c.GetEnabled() +} + +func TestConfigSettingsGithubSSL_GetKey(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsGithubSSL{Key: &zeroValue} + c.GetKey() + c = &ConfigSettingsGithubSSL{} + c.GetKey() + c = nil + c.GetKey() +} + +func TestConfigSettingsLDAP_GetAdminGroup(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsLDAP{AdminGroup: &zeroValue} + c.GetAdminGroup() + c = &ConfigSettingsLDAP{} + c.GetAdminGroup() + c = nil + c.GetAdminGroup() +} + +func TestConfigSettingsLDAP_GetBindDN(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsLDAP{BindDN: &zeroValue} + c.GetBindDN() + c = &ConfigSettingsLDAP{} + c.GetBindDN() + c = nil + c.GetBindDN() +} + +func TestConfigSettingsLDAP_GetHost(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsLDAP{Host: &zeroValue} + c.GetHost() + c = &ConfigSettingsLDAP{} + c.GetHost() + c = nil + c.GetHost() +} + +func TestConfigSettingsLDAP_GetMethod(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsLDAP{Method: &zeroValue} + c.GetMethod() + c = &ConfigSettingsLDAP{} + c.GetMethod() + c = nil + c.GetMethod() +} + +func TestConfigSettingsLDAP_GetPassword(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsLDAP{Password: &zeroValue} + c.GetPassword() + c = &ConfigSettingsLDAP{} + c.GetPassword() + c = nil + c.GetPassword() +} + +func TestConfigSettingsLDAP_GetPort(tt *testing.T) { + tt.Parallel() + var zeroValue int + c := &ConfigSettingsLDAP{Port: &zeroValue} + c.GetPort() + c = &ConfigSettingsLDAP{} + c.GetPort() + c = nil + c.GetPort() +} + +func TestConfigSettingsLDAP_GetPosixSupport(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettingsLDAP{PosixSupport: &zeroValue} + c.GetPosixSupport() + c = &ConfigSettingsLDAP{} + c.GetPosixSupport() + c = nil + c.GetPosixSupport() +} + +func TestConfigSettingsLDAP_GetProfile(tt *testing.T) { + tt.Parallel() + c := &ConfigSettingsLDAP{} + c.GetProfile() + c = nil + c.GetProfile() +} + +func TestConfigSettingsLDAP_GetReconciliation(tt *testing.T) { + tt.Parallel() + c := &ConfigSettingsLDAP{} + c.GetReconciliation() + c = nil + c.GetReconciliation() +} + +func TestConfigSettingsLDAP_GetRecursiveGroupSearch(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettingsLDAP{RecursiveGroupSearch: &zeroValue} + c.GetRecursiveGroupSearch() + c = &ConfigSettingsLDAP{} + c.GetRecursiveGroupSearch() + c = nil + c.GetRecursiveGroupSearch() +} + +func TestConfigSettingsLDAP_GetSearchStrategy(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsLDAP{SearchStrategy: &zeroValue} + c.GetSearchStrategy() + c = &ConfigSettingsLDAP{} + c.GetSearchStrategy() + c = nil + c.GetSearchStrategy() +} + +func TestConfigSettingsLDAP_GetSyncEnabled(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettingsLDAP{SyncEnabled: &zeroValue} + c.GetSyncEnabled() + c = &ConfigSettingsLDAP{} + c.GetSyncEnabled() + c = nil + c.GetSyncEnabled() +} + +func TestConfigSettingsLDAP_GetTeamSyncInterval(tt *testing.T) { + tt.Parallel() + var zeroValue int + c := &ConfigSettingsLDAP{TeamSyncInterval: &zeroValue} + c.GetTeamSyncInterval() + c = &ConfigSettingsLDAP{} + c.GetTeamSyncInterval() + c = nil + c.GetTeamSyncInterval() +} + +func TestConfigSettingsLDAP_GetUID(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsLDAP{UID: &zeroValue} + c.GetUID() + c = &ConfigSettingsLDAP{} + c.GetUID() + c = nil + c.GetUID() +} + +func TestConfigSettingsLDAP_GetUserSyncEmails(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettingsLDAP{UserSyncEmails: &zeroValue} + c.GetUserSyncEmails() + c = &ConfigSettingsLDAP{} + c.GetUserSyncEmails() + c = nil + c.GetUserSyncEmails() +} + +func TestConfigSettingsLDAP_GetUserSyncInterval(tt *testing.T) { + tt.Parallel() + var zeroValue int + c := &ConfigSettingsLDAP{UserSyncInterval: &zeroValue} + c.GetUserSyncInterval() + c = &ConfigSettingsLDAP{} + c.GetUserSyncInterval() + c = nil + c.GetUserSyncInterval() +} + +func TestConfigSettingsLDAP_GetUserSyncKeys(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettingsLDAP{UserSyncKeys: &zeroValue} + c.GetUserSyncKeys() + c = &ConfigSettingsLDAP{} + c.GetUserSyncKeys() + c = nil + c.GetUserSyncKeys() +} + +func TestConfigSettingsLDAP_GetVirtualAttributeEnabled(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettingsLDAP{VirtualAttributeEnabled: &zeroValue} + c.GetVirtualAttributeEnabled() + c = &ConfigSettingsLDAP{} + c.GetVirtualAttributeEnabled() + c = nil + c.GetVirtualAttributeEnabled() +} + +func TestConfigSettingsLDAPProfile_GetKey(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsLDAPProfile{Key: &zeroValue} + c.GetKey() + c = &ConfigSettingsLDAPProfile{} + c.GetKey() + c = nil + c.GetKey() +} + +func TestConfigSettingsLDAPProfile_GetMail(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsLDAPProfile{Mail: &zeroValue} + c.GetMail() + c = &ConfigSettingsLDAPProfile{} + c.GetMail() + c = nil + c.GetMail() +} + +func TestConfigSettingsLDAPProfile_GetName(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsLDAPProfile{Name: &zeroValue} + c.GetName() + c = &ConfigSettingsLDAPProfile{} + c.GetName() + c = nil + c.GetName() +} + +func TestConfigSettingsLDAPProfile_GetUID(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsLDAPProfile{UID: &zeroValue} + c.GetUID() + c = &ConfigSettingsLDAPProfile{} + c.GetUID() + c = nil + c.GetUID() +} + +func TestConfigSettingsLDAPReconciliation_GetOrg(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsLDAPReconciliation{Org: &zeroValue} + c.GetOrg() + c = &ConfigSettingsLDAPReconciliation{} + c.GetOrg() + c = nil + c.GetOrg() +} + +func TestConfigSettingsLDAPReconciliation_GetUser(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsLDAPReconciliation{User: &zeroValue} + c.GetUser() + c = &ConfigSettingsLDAPReconciliation{} + c.GetUser() + c = nil + c.GetUser() +} + +func TestConfigSettingsLicenseSettings_GetClusterSupport(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettingsLicenseSettings{ClusterSupport: &zeroValue} + c.GetClusterSupport() + c = &ConfigSettingsLicenseSettings{} + c.GetClusterSupport() + c = nil + c.GetClusterSupport() +} + +func TestConfigSettingsLicenseSettings_GetEvaluation(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettingsLicenseSettings{Evaluation: &zeroValue} + c.GetEvaluation() + c = &ConfigSettingsLicenseSettings{} + c.GetEvaluation() + c = nil + c.GetEvaluation() +} + +func TestConfigSettingsLicenseSettings_GetExpireAt(tt *testing.T) { + tt.Parallel() + var zeroValue Timestamp + c := &ConfigSettingsLicenseSettings{ExpireAt: &zeroValue} + c.GetExpireAt() + c = &ConfigSettingsLicenseSettings{} + c.GetExpireAt() + c = nil + c.GetExpireAt() +} + +func TestConfigSettingsLicenseSettings_GetPerpetual(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettingsLicenseSettings{Perpetual: &zeroValue} + c.GetPerpetual() + c = &ConfigSettingsLicenseSettings{} + c.GetPerpetual() + c = nil + c.GetPerpetual() +} + +func TestConfigSettingsLicenseSettings_GetSeats(tt *testing.T) { + tt.Parallel() + var zeroValue int + c := &ConfigSettingsLicenseSettings{Seats: &zeroValue} + c.GetSeats() + c = &ConfigSettingsLicenseSettings{} + c.GetSeats() + c = nil + c.GetSeats() +} + +func TestConfigSettingsLicenseSettings_GetSSHAllowed(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettingsLicenseSettings{SSHAllowed: &zeroValue} + c.GetSSHAllowed() + c = &ConfigSettingsLicenseSettings{} + c.GetSSHAllowed() + c = nil + c.GetSSHAllowed() +} + +func TestConfigSettingsLicenseSettings_GetSupportKey(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsLicenseSettings{SupportKey: &zeroValue} + c.GetSupportKey() + c = &ConfigSettingsLicenseSettings{} + c.GetSupportKey() + c = nil + c.GetSupportKey() +} + +func TestConfigSettingsLicenseSettings_GetUnlimitedSeating(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettingsLicenseSettings{UnlimitedSeating: &zeroValue} + c.GetUnlimitedSeating() + c = &ConfigSettingsLicenseSettings{} + c.GetUnlimitedSeating() + c = nil + c.GetUnlimitedSeating() +} + +func TestConfigSettingsMapping_GetBasemap(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsMapping{Basemap: &zeroValue} + c.GetBasemap() + c = &ConfigSettingsMapping{} + c.GetBasemap() + c = nil + c.GetBasemap() +} + +func TestConfigSettingsMapping_GetEnabled(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettingsMapping{Enabled: &zeroValue} + c.GetEnabled() + c = &ConfigSettingsMapping{} + c.GetEnabled() + c = nil + c.GetEnabled() +} + +func TestConfigSettingsMapping_GetTileserver(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsMapping{Tileserver: &zeroValue} + c.GetTileserver() + c = &ConfigSettingsMapping{} + c.GetTileserver() + c = nil + c.GetTileserver() +} + +func TestConfigSettingsMapping_GetToken(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsMapping{Token: &zeroValue} + c.GetToken() + c = &ConfigSettingsMapping{} + c.GetToken() + c = nil + c.GetToken() +} + +func TestConfigSettingsNTP_GetPrimaryServer(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsNTP{PrimaryServer: &zeroValue} + c.GetPrimaryServer() + c = &ConfigSettingsNTP{} + c.GetPrimaryServer() + c = nil + c.GetPrimaryServer() +} + +func TestConfigSettingsNTP_GetSecondaryServer(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsNTP{SecondaryServer: &zeroValue} + c.GetSecondaryServer() + c = &ConfigSettingsNTP{} + c.GetSecondaryServer() + c = nil + c.GetSecondaryServer() +} + +func TestConfigSettingsPagesSettings_GetEnabled(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettingsPagesSettings{Enabled: &zeroValue} + c.GetEnabled() + c = &ConfigSettingsPagesSettings{} + c.GetEnabled() + c = nil + c.GetEnabled() +} + +func TestConfigSettingsSAML_GetCertificate(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsSAML{Certificate: &zeroValue} + c.GetCertificate() + c = &ConfigSettingsSAML{} + c.GetCertificate() + c = nil + c.GetCertificate() +} + +func TestConfigSettingsSAML_GetCertificatePath(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsSAML{CertificatePath: &zeroValue} + c.GetCertificatePath() + c = &ConfigSettingsSAML{} + c.GetCertificatePath() + c = nil + c.GetCertificatePath() +} + +func TestConfigSettingsSAML_GetDisableAdminDemote(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettingsSAML{DisableAdminDemote: &zeroValue} + c.GetDisableAdminDemote() + c = &ConfigSettingsSAML{} + c.GetDisableAdminDemote() + c = nil + c.GetDisableAdminDemote() +} + +func TestConfigSettingsSAML_GetIDPInitiatedSSO(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettingsSAML{IDPInitiatedSSO: &zeroValue} + c.GetIDPInitiatedSSO() + c = &ConfigSettingsSAML{} + c.GetIDPInitiatedSSO() + c = nil + c.GetIDPInitiatedSSO() +} + +func TestConfigSettingsSAML_GetIssuer(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsSAML{Issuer: &zeroValue} + c.GetIssuer() + c = &ConfigSettingsSAML{} + c.GetIssuer() + c = nil + c.GetIssuer() +} + +func TestConfigSettingsSAML_GetSSOURL(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsSAML{SSOURL: &zeroValue} + c.GetSSOURL() + c = &ConfigSettingsSAML{} + c.GetSSOURL() + c = nil + c.GetSSOURL() +} + +func TestConfigSettingsSMTP_GetAddress(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsSMTP{Address: &zeroValue} + c.GetAddress() + c = &ConfigSettingsSMTP{} + c.GetAddress() + c = nil + c.GetAddress() +} + +func TestConfigSettingsSMTP_GetAuthentication(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsSMTP{Authentication: &zeroValue} + c.GetAuthentication() + c = &ConfigSettingsSMTP{} + c.GetAuthentication() + c = nil + c.GetAuthentication() +} + +func TestConfigSettingsSMTP_GetDiscardToNoreplyAddress(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettingsSMTP{DiscardToNoreplyAddress: &zeroValue} + c.GetDiscardToNoreplyAddress() + c = &ConfigSettingsSMTP{} + c.GetDiscardToNoreplyAddress() + c = nil + c.GetDiscardToNoreplyAddress() +} + +func TestConfigSettingsSMTP_GetDomain(tt *testing.T) { + tt.Parallel() + var zeroValue string + c := &ConfigSettingsSMTP{Domain: &zeroValue} + c.GetDomain() + c = &ConfigSettingsSMTP{} + c.GetDomain() + c = nil + c.GetDomain() +} + +func TestConfigSettingsSMTP_GetEnabled(tt *testing.T) { + tt.Parallel() + var zeroValue bool + c := &ConfigSettingsSMTP{Enabled: &zeroValue} + c.GetEnabled() + c = &ConfigSettingsSMTP{} + c.GetEnabled() + c = nil + c.GetEnabled() } -func TestCommitStats_GetDeletions(tt *testing.T) { +func TestConfigSettingsSMTP_GetEnableStarttlsAuto(tt *testing.T) { tt.Parallel() - var zeroValue int - c := &CommitStats{Deletions: &zeroValue} - c.GetDeletions() - c = &CommitStats{} - c.GetDeletions() + var zeroValue bool + c := &ConfigSettingsSMTP{EnableStarttlsAuto: &zeroValue} + c.GetEnableStarttlsAuto() + c = &ConfigSettingsSMTP{} + c.GetEnableStarttlsAuto() c = nil - c.GetDeletions() + c.GetEnableStarttlsAuto() } -func TestCommitStats_GetTotal(tt *testing.T) { +func TestConfigSettingsSMTP_GetNoreplyAddress(tt *testing.T) { tt.Parallel() - var zeroValue int - c := &CommitStats{Total: &zeroValue} - c.GetTotal() - c = &CommitStats{} - c.GetTotal() + var zeroValue string + c := &ConfigSettingsSMTP{NoreplyAddress: &zeroValue} + c.GetNoreplyAddress() + c = &ConfigSettingsSMTP{} + c.GetNoreplyAddress() c = nil - c.GetTotal() + c.GetNoreplyAddress() } -func TestCommunityHealthFiles_GetCodeOfConduct(tt *testing.T) { +func TestConfigSettingsSMTP_GetPassword(tt *testing.T) { tt.Parallel() - c := &CommunityHealthFiles{} - c.GetCodeOfConduct() + var zeroValue string + c := &ConfigSettingsSMTP{Password: &zeroValue} + c.GetPassword() + c = &ConfigSettingsSMTP{} + c.GetPassword() c = nil - c.GetCodeOfConduct() + c.GetPassword() } -func TestCommunityHealthFiles_GetCodeOfConductFile(tt *testing.T) { +func TestConfigSettingsSMTP_GetPort(tt *testing.T) { tt.Parallel() - c := &CommunityHealthFiles{} - c.GetCodeOfConductFile() + var zeroValue string + c := &ConfigSettingsSMTP{Port: &zeroValue} + c.GetPort() + c = &ConfigSettingsSMTP{} + c.GetPort() c = nil - c.GetCodeOfConductFile() + c.GetPort() } -func TestCommunityHealthFiles_GetContributing(tt *testing.T) { +func TestConfigSettingsSMTP_GetSupportAddress(tt *testing.T) { tt.Parallel() - c := &CommunityHealthFiles{} - c.GetContributing() + var zeroValue string + c := &ConfigSettingsSMTP{SupportAddress: &zeroValue} + c.GetSupportAddress() + c = &ConfigSettingsSMTP{} + c.GetSupportAddress() c = nil - c.GetContributing() + c.GetSupportAddress() } -func TestCommunityHealthFiles_GetIssueTemplate(tt *testing.T) { +func TestConfigSettingsSMTP_GetSupportAddressType(tt *testing.T) { tt.Parallel() - c := &CommunityHealthFiles{} - c.GetIssueTemplate() + var zeroValue string + c := &ConfigSettingsSMTP{SupportAddressType: &zeroValue} + c.GetSupportAddressType() + c = &ConfigSettingsSMTP{} + c.GetSupportAddressType() c = nil - c.GetIssueTemplate() + c.GetSupportAddressType() } -func TestCommunityHealthFiles_GetLicense(tt *testing.T) { +func TestConfigSettingsSMTP_GetUsername(tt *testing.T) { tt.Parallel() - c := &CommunityHealthFiles{} - c.GetLicense() + var zeroValue string + c := &ConfigSettingsSMTP{Username: &zeroValue} + c.GetUsername() + c = &ConfigSettingsSMTP{} + c.GetUsername() c = nil - c.GetLicense() + c.GetUsername() } -func TestCommunityHealthFiles_GetPullRequestTemplate(tt *testing.T) { +func TestConfigSettingsSMTP_GetUserName(tt *testing.T) { tt.Parallel() - c := &CommunityHealthFiles{} - c.GetPullRequestTemplate() + var zeroValue string + c := &ConfigSettingsSMTP{UserName: &zeroValue} + c.GetUserName() + c = &ConfigSettingsSMTP{} + c.GetUserName() c = nil - c.GetPullRequestTemplate() + c.GetUserName() } -func TestCommunityHealthFiles_GetReadme(tt *testing.T) { +func TestConfigSettingsSNMP_GetCommunity(tt *testing.T) { tt.Parallel() - c := &CommunityHealthFiles{} - c.GetReadme() + var zeroValue string + c := &ConfigSettingsSNMP{Community: &zeroValue} + c.GetCommunity() + c = &ConfigSettingsSNMP{} + c.GetCommunity() c = nil - c.GetReadme() + c.GetCommunity() } -func TestCommunityHealthMetrics_GetContentReportsEnabled(tt *testing.T) { +func TestConfigSettingsSNMP_GetEnabled(tt *testing.T) { tt.Parallel() var zeroValue bool - c := &CommunityHealthMetrics{ContentReportsEnabled: &zeroValue} - c.GetContentReportsEnabled() - c = &CommunityHealthMetrics{} - c.GetContentReportsEnabled() + c := &ConfigSettingsSNMP{Enabled: &zeroValue} + c.GetEnabled() + c = &ConfigSettingsSNMP{} + c.GetEnabled() c = nil - c.GetContentReportsEnabled() + c.GetEnabled() } -func TestCommunityHealthMetrics_GetDescription(tt *testing.T) { +func TestConfigSettingsSyslog_GetEnabled(tt *testing.T) { tt.Parallel() - var zeroValue string - c := &CommunityHealthMetrics{Description: &zeroValue} - c.GetDescription() - c = &CommunityHealthMetrics{} - c.GetDescription() + var zeroValue bool + c := &ConfigSettingsSyslog{Enabled: &zeroValue} + c.GetEnabled() + c = &ConfigSettingsSyslog{} + c.GetEnabled() c = nil - c.GetDescription() + c.GetEnabled() } -func TestCommunityHealthMetrics_GetDocumentation(tt *testing.T) { +func TestConfigSettingsSyslog_GetProtocolName(tt *testing.T) { tt.Parallel() var zeroValue string - c := &CommunityHealthMetrics{Documentation: &zeroValue} - c.GetDocumentation() - c = &CommunityHealthMetrics{} - c.GetDocumentation() + c := &ConfigSettingsSyslog{ProtocolName: &zeroValue} + c.GetProtocolName() + c = &ConfigSettingsSyslog{} + c.GetProtocolName() c = nil - c.GetDocumentation() + c.GetProtocolName() } -func TestCommunityHealthMetrics_GetFiles(tt *testing.T) { +func TestConfigSettingsSyslog_GetServer(tt *testing.T) { tt.Parallel() - c := &CommunityHealthMetrics{} - c.GetFiles() + var zeroValue string + c := &ConfigSettingsSyslog{Server: &zeroValue} + c.GetServer() + c = &ConfigSettingsSyslog{} + c.GetServer() c = nil - c.GetFiles() + c.GetServer() } -func TestCommunityHealthMetrics_GetHealthPercentage(tt *testing.T) { +func TestConnectionServiceItem_GetName(tt *testing.T) { tt.Parallel() - var zeroValue int - c := &CommunityHealthMetrics{HealthPercentage: &zeroValue} - c.GetHealthPercentage() - c = &CommunityHealthMetrics{} - c.GetHealthPercentage() + var zeroValue string + c := &ConnectionServiceItem{Name: &zeroValue} + c.GetName() + c = &ConnectionServiceItem{} + c.GetName() c = nil - c.GetHealthPercentage() + c.GetName() } -func TestCommunityHealthMetrics_GetUpdatedAt(tt *testing.T) { +func TestConnectionServiceItem_GetNumber(tt *testing.T) { tt.Parallel() - var zeroValue Timestamp - c := &CommunityHealthMetrics{UpdatedAt: &zeroValue} - c.GetUpdatedAt() - c = &CommunityHealthMetrics{} - c.GetUpdatedAt() + var zeroValue int + c := &ConnectionServiceItem{Number: &zeroValue} + c.GetNumber() + c = &ConnectionServiceItem{} + c.GetNumber() c = nil - c.GetUpdatedAt() + c.GetNumber() } func TestContentReference_GetID(tt *testing.T) { @@ -14913,117 +16457,326 @@ func TestLicense_GetConditions(tt *testing.T) { l = &License{} l.GetConditions() l = nil - l.GetConditions() + l.GetConditions() +} + +func TestLicense_GetDescription(tt *testing.T) { + tt.Parallel() + var zeroValue string + l := &License{Description: &zeroValue} + l.GetDescription() + l = &License{} + l.GetDescription() + l = nil + l.GetDescription() +} + +func TestLicense_GetFeatured(tt *testing.T) { + tt.Parallel() + var zeroValue bool + l := &License{Featured: &zeroValue} + l.GetFeatured() + l = &License{} + l.GetFeatured() + l = nil + l.GetFeatured() +} + +func TestLicense_GetHTMLURL(tt *testing.T) { + tt.Parallel() + var zeroValue string + l := &License{HTMLURL: &zeroValue} + l.GetHTMLURL() + l = &License{} + l.GetHTMLURL() + l = nil + l.GetHTMLURL() +} + +func TestLicense_GetImplementation(tt *testing.T) { + tt.Parallel() + var zeroValue string + l := &License{Implementation: &zeroValue} + l.GetImplementation() + l = &License{} + l.GetImplementation() + l = nil + l.GetImplementation() +} + +func TestLicense_GetKey(tt *testing.T) { + tt.Parallel() + var zeroValue string + l := &License{Key: &zeroValue} + l.GetKey() + l = &License{} + l.GetKey() + l = nil + l.GetKey() +} + +func TestLicense_GetLimitations(tt *testing.T) { + tt.Parallel() + var zeroValue []string + l := &License{Limitations: &zeroValue} + l.GetLimitations() + l = &License{} + l.GetLimitations() + l = nil + l.GetLimitations() +} + +func TestLicense_GetName(tt *testing.T) { + tt.Parallel() + var zeroValue string + l := &License{Name: &zeroValue} + l.GetName() + l = &License{} + l.GetName() + l = nil + l.GetName() +} + +func TestLicense_GetPermissions(tt *testing.T) { + tt.Parallel() + var zeroValue []string + l := &License{Permissions: &zeroValue} + l.GetPermissions() + l = &License{} + l.GetPermissions() + l = nil + l.GetPermissions() +} + +func TestLicense_GetSPDXID(tt *testing.T) { + tt.Parallel() + var zeroValue string + l := &License{SPDXID: &zeroValue} + l.GetSPDXID() + l = &License{} + l.GetSPDXID() + l = nil + l.GetSPDXID() +} + +func TestLicense_GetURL(tt *testing.T) { + tt.Parallel() + var zeroValue string + l := &License{URL: &zeroValue} + l.GetURL() + l = &License{} + l.GetURL() + l = nil + l.GetURL() +} + +func TestLicenseCheck_GetStatus(tt *testing.T) { + tt.Parallel() + var zeroValue string + l := &LicenseCheck{Status: &zeroValue} + l.GetStatus() + l = &LicenseCheck{} + l.GetStatus() + l = nil + l.GetStatus() +} + +func TestLicenseStatus_GetAdvancedSecurityEnabled(tt *testing.T) { + tt.Parallel() + var zeroValue bool + l := &LicenseStatus{AdvancedSecurityEnabled: &zeroValue} + l.GetAdvancedSecurityEnabled() + l = &LicenseStatus{} + l.GetAdvancedSecurityEnabled() + l = nil + l.GetAdvancedSecurityEnabled() +} + +func TestLicenseStatus_GetAdvancedSecuritySeats(tt *testing.T) { + tt.Parallel() + var zeroValue int + l := &LicenseStatus{AdvancedSecuritySeats: &zeroValue} + l.GetAdvancedSecuritySeats() + l = &LicenseStatus{} + l.GetAdvancedSecuritySeats() + l = nil + l.GetAdvancedSecuritySeats() +} + +func TestLicenseStatus_GetClusterSupport(tt *testing.T) { + tt.Parallel() + var zeroValue bool + l := &LicenseStatus{ClusterSupport: &zeroValue} + l.GetClusterSupport() + l = &LicenseStatus{} + l.GetClusterSupport() + l = nil + l.GetClusterSupport() +} + +func TestLicenseStatus_GetCompany(tt *testing.T) { + tt.Parallel() + var zeroValue string + l := &LicenseStatus{Company: &zeroValue} + l.GetCompany() + l = &LicenseStatus{} + l.GetCompany() + l = nil + l.GetCompany() +} + +func TestLicenseStatus_GetCroquetSupport(tt *testing.T) { + tt.Parallel() + var zeroValue bool + l := &LicenseStatus{CroquetSupport: &zeroValue} + l.GetCroquetSupport() + l = &LicenseStatus{} + l.GetCroquetSupport() + l = nil + l.GetCroquetSupport() +} + +func TestLicenseStatus_GetCustomTerms(tt *testing.T) { + tt.Parallel() + var zeroValue bool + l := &LicenseStatus{CustomTerms: &zeroValue} + l.GetCustomTerms() + l = &LicenseStatus{} + l.GetCustomTerms() + l = nil + l.GetCustomTerms() } -func TestLicense_GetDescription(tt *testing.T) { +func TestLicenseStatus_GetEvaluation(tt *testing.T) { tt.Parallel() - var zeroValue string - l := &License{Description: &zeroValue} - l.GetDescription() - l = &License{} - l.GetDescription() + var zeroValue bool + l := &LicenseStatus{Evaluation: &zeroValue} + l.GetEvaluation() + l = &LicenseStatus{} + l.GetEvaluation() l = nil - l.GetDescription() + l.GetEvaluation() } -func TestLicense_GetFeatured(tt *testing.T) { +func TestLicenseStatus_GetExpireAt(tt *testing.T) { + tt.Parallel() + var zeroValue Timestamp + l := &LicenseStatus{ExpireAt: &zeroValue} + l.GetExpireAt() + l = &LicenseStatus{} + l.GetExpireAt() + l = nil + l.GetExpireAt() +} + +func TestLicenseStatus_GetInsightsEnabled(tt *testing.T) { tt.Parallel() var zeroValue bool - l := &License{Featured: &zeroValue} - l.GetFeatured() - l = &License{} - l.GetFeatured() + l := &LicenseStatus{InsightsEnabled: &zeroValue} + l.GetInsightsEnabled() + l = &LicenseStatus{} + l.GetInsightsEnabled() l = nil - l.GetFeatured() + l.GetInsightsEnabled() } -func TestLicense_GetHTMLURL(tt *testing.T) { +func TestLicenseStatus_GetInsightsExpireAt(tt *testing.T) { tt.Parallel() - var zeroValue string - l := &License{HTMLURL: &zeroValue} - l.GetHTMLURL() - l = &License{} - l.GetHTMLURL() + var zeroValue Timestamp + l := &LicenseStatus{InsightsExpireAt: &zeroValue} + l.GetInsightsExpireAt() + l = &LicenseStatus{} + l.GetInsightsExpireAt() l = nil - l.GetHTMLURL() + l.GetInsightsExpireAt() } -func TestLicense_GetImplementation(tt *testing.T) { +func TestLicenseStatus_GetLearningLabEvaluationExpires(tt *testing.T) { tt.Parallel() - var zeroValue string - l := &License{Implementation: &zeroValue} - l.GetImplementation() - l = &License{} - l.GetImplementation() + var zeroValue Timestamp + l := &LicenseStatus{LearningLabEvaluationExpires: &zeroValue} + l.GetLearningLabEvaluationExpires() + l = &LicenseStatus{} + l.GetLearningLabEvaluationExpires() l = nil - l.GetImplementation() + l.GetLearningLabEvaluationExpires() } -func TestLicense_GetKey(tt *testing.T) { +func TestLicenseStatus_GetLearningLabSeats(tt *testing.T) { tt.Parallel() - var zeroValue string - l := &License{Key: &zeroValue} - l.GetKey() - l = &License{} - l.GetKey() + var zeroValue int + l := &LicenseStatus{LearningLabSeats: &zeroValue} + l.GetLearningLabSeats() + l = &LicenseStatus{} + l.GetLearningLabSeats() l = nil - l.GetKey() + l.GetLearningLabSeats() } -func TestLicense_GetLimitations(tt *testing.T) { +func TestLicenseStatus_GetPerpetual(tt *testing.T) { tt.Parallel() - var zeroValue []string - l := &License{Limitations: &zeroValue} - l.GetLimitations() - l = &License{} - l.GetLimitations() + var zeroValue bool + l := &LicenseStatus{Perpetual: &zeroValue} + l.GetPerpetual() + l = &LicenseStatus{} + l.GetPerpetual() l = nil - l.GetLimitations() + l.GetPerpetual() } -func TestLicense_GetName(tt *testing.T) { +func TestLicenseStatus_GetReferenceNumber(tt *testing.T) { tt.Parallel() var zeroValue string - l := &License{Name: &zeroValue} - l.GetName() - l = &License{} - l.GetName() + l := &LicenseStatus{ReferenceNumber: &zeroValue} + l.GetReferenceNumber() + l = &LicenseStatus{} + l.GetReferenceNumber() l = nil - l.GetName() + l.GetReferenceNumber() } -func TestLicense_GetPermissions(tt *testing.T) { +func TestLicenseStatus_GetSeats(tt *testing.T) { tt.Parallel() - var zeroValue []string - l := &License{Permissions: &zeroValue} - l.GetPermissions() - l = &License{} - l.GetPermissions() + var zeroValue int + l := &LicenseStatus{Seats: &zeroValue} + l.GetSeats() + l = &LicenseStatus{} + l.GetSeats() l = nil - l.GetPermissions() + l.GetSeats() } -func TestLicense_GetSPDXID(tt *testing.T) { +func TestLicenseStatus_GetSSHAllowed(tt *testing.T) { tt.Parallel() - var zeroValue string - l := &License{SPDXID: &zeroValue} - l.GetSPDXID() - l = &License{} - l.GetSPDXID() + var zeroValue bool + l := &LicenseStatus{SSHAllowed: &zeroValue} + l.GetSSHAllowed() + l = &LicenseStatus{} + l.GetSSHAllowed() l = nil - l.GetSPDXID() + l.GetSSHAllowed() } -func TestLicense_GetURL(tt *testing.T) { +func TestLicenseStatus_GetSupportKey(tt *testing.T) { tt.Parallel() var zeroValue string - l := &License{URL: &zeroValue} - l.GetURL() - l = &License{} - l.GetURL() + l := &LicenseStatus{SupportKey: &zeroValue} + l.GetSupportKey() + l = &LicenseStatus{} + l.GetSupportKey() l = nil - l.GetURL() + l.GetSupportKey() +} + +func TestLicenseStatus_GetUnlimitedSeating(tt *testing.T) { + tt.Parallel() + var zeroValue bool + l := &LicenseStatus{UnlimitedSeating: &zeroValue} + l.GetUnlimitedSeating() + l = &LicenseStatus{} + l.GetUnlimitedSeating() + l = nil + l.GetUnlimitedSeating() } func TestLinearHistoryRequirementEnforcementLevelChanges_GetFrom(tt *testing.T) { @@ -15499,6 +17252,138 @@ func TestLockBranch_GetEnabled(tt *testing.T) { l.GetEnabled() } +func TestMaintenanceOperationStatus_GetHostname(tt *testing.T) { + tt.Parallel() + var zeroValue string + m := &MaintenanceOperationStatus{Hostname: &zeroValue} + m.GetHostname() + m = &MaintenanceOperationStatus{} + m.GetHostname() + m = nil + m.GetHostname() +} + +func TestMaintenanceOperationStatus_GetMessage(tt *testing.T) { + tt.Parallel() + var zeroValue string + m := &MaintenanceOperationStatus{Message: &zeroValue} + m.GetMessage() + m = &MaintenanceOperationStatus{} + m.GetMessage() + m = nil + m.GetMessage() +} + +func TestMaintenanceOperationStatus_GetUUID(tt *testing.T) { + tt.Parallel() + var zeroValue string + m := &MaintenanceOperationStatus{UUID: &zeroValue} + m.GetUUID() + m = &MaintenanceOperationStatus{} + m.GetUUID() + m = nil + m.GetUUID() +} + +func TestMaintenanceOptions_GetMaintenanceModeMessage(tt *testing.T) { + tt.Parallel() + var zeroValue string + m := &MaintenanceOptions{MaintenanceModeMessage: &zeroValue} + m.GetMaintenanceModeMessage() + m = &MaintenanceOptions{} + m.GetMaintenanceModeMessage() + m = nil + m.GetMaintenanceModeMessage() +} + +func TestMaintenanceOptions_GetUUID(tt *testing.T) { + tt.Parallel() + var zeroValue string + m := &MaintenanceOptions{UUID: &zeroValue} + m.GetUUID() + m = &MaintenanceOptions{} + m.GetUUID() + m = nil + m.GetUUID() +} + +func TestMaintenanceOptions_GetWhen(tt *testing.T) { + tt.Parallel() + var zeroValue string + m := &MaintenanceOptions{When: &zeroValue} + m.GetWhen() + m = &MaintenanceOptions{} + m.GetWhen() + m = nil + m.GetWhen() +} + +func TestMaintenanceStatus_GetCanUnsetMaintenance(tt *testing.T) { + tt.Parallel() + var zeroValue bool + m := &MaintenanceStatus{CanUnsetMaintenance: &zeroValue} + m.GetCanUnsetMaintenance() + m = &MaintenanceStatus{} + m.GetCanUnsetMaintenance() + m = nil + m.GetCanUnsetMaintenance() +} + +func TestMaintenanceStatus_GetHostname(tt *testing.T) { + tt.Parallel() + var zeroValue string + m := &MaintenanceStatus{Hostname: &zeroValue} + m.GetHostname() + m = &MaintenanceStatus{} + m.GetHostname() + m = nil + m.GetHostname() +} + +func TestMaintenanceStatus_GetMaintenanceModeMessage(tt *testing.T) { + tt.Parallel() + var zeroValue string + m := &MaintenanceStatus{MaintenanceModeMessage: &zeroValue} + m.GetMaintenanceModeMessage() + m = &MaintenanceStatus{} + m.GetMaintenanceModeMessage() + m = nil + m.GetMaintenanceModeMessage() +} + +func TestMaintenanceStatus_GetScheduledTime(tt *testing.T) { + tt.Parallel() + var zeroValue Timestamp + m := &MaintenanceStatus{ScheduledTime: &zeroValue} + m.GetScheduledTime() + m = &MaintenanceStatus{} + m.GetScheduledTime() + m = nil + m.GetScheduledTime() +} + +func TestMaintenanceStatus_GetStatus(tt *testing.T) { + tt.Parallel() + var zeroValue string + m := &MaintenanceStatus{Status: &zeroValue} + m.GetStatus() + m = &MaintenanceStatus{} + m.GetStatus() + m = nil + m.GetStatus() +} + +func TestMaintenanceStatus_GetUUID(tt *testing.T) { + tt.Parallel() + var zeroValue string + m := &MaintenanceStatus{UUID: &zeroValue} + m.GetUUID() + m = &MaintenanceStatus{} + m.GetUUID() + m = nil + m.GetUUID() +} + func TestMarketplacePendingChange_GetEffectiveDate(tt *testing.T) { tt.Parallel() var zeroValue Timestamp @@ -17069,6 +18954,80 @@ func TestNewTeam_GetPrivacy(tt *testing.T) { n.GetPrivacy() } +func TestNodeDetails_GetHostname(tt *testing.T) { + tt.Parallel() + var zeroValue string + n := &NodeDetails{Hostname: &zeroValue} + n.GetHostname() + n = &NodeDetails{} + n.GetHostname() + n = nil + n.GetHostname() +} + +func TestNodeDetails_GetUUID(tt *testing.T) { + tt.Parallel() + var zeroValue string + n := &NodeDetails{UUID: &zeroValue} + n.GetUUID() + n = &NodeDetails{} + n.GetUUID() + n = nil + n.GetUUID() +} + +func TestNodeMetadataStatus_GetTopology(tt *testing.T) { + tt.Parallel() + var zeroValue string + n := &NodeMetadataStatus{Topology: &zeroValue} + n.GetTopology() + n = &NodeMetadataStatus{} + n.GetTopology() + n = nil + n.GetTopology() +} + +func TestNodeQueryOptions_GetClusterRoles(tt *testing.T) { + tt.Parallel() + var zeroValue string + n := &NodeQueryOptions{ClusterRoles: &zeroValue} + n.GetClusterRoles() + n = &NodeQueryOptions{} + n.GetClusterRoles() + n = nil + n.GetClusterRoles() +} + +func TestNodeQueryOptions_GetUUID(tt *testing.T) { + tt.Parallel() + var zeroValue string + n := &NodeQueryOptions{UUID: &zeroValue} + n.GetUUID() + n = &NodeQueryOptions{} + n.GetUUID() + n = nil + n.GetUUID() +} + +func TestNodeReleaseVersion_GetHostname(tt *testing.T) { + tt.Parallel() + var zeroValue string + n := &NodeReleaseVersion{Hostname: &zeroValue} + n.GetHostname() + n = &NodeReleaseVersion{} + n.GetHostname() + n = nil + n.GetHostname() +} + +func TestNodeReleaseVersion_GetVersion(tt *testing.T) { + tt.Parallel() + n := &NodeReleaseVersion{} + n.GetVersion() + n = nil + n.GetVersion() +} + func TestNotification_GetID(tt *testing.T) { tt.Parallel() var zeroValue string @@ -24184,6 +26143,50 @@ func TestReleaseEvent_GetSender(tt *testing.T) { r.GetSender() } +func TestReleaseVersion_GetBuildDate(tt *testing.T) { + tt.Parallel() + var zeroValue string + r := &ReleaseVersion{BuildDate: &zeroValue} + r.GetBuildDate() + r = &ReleaseVersion{} + r.GetBuildDate() + r = nil + r.GetBuildDate() +} + +func TestReleaseVersion_GetBuildID(tt *testing.T) { + tt.Parallel() + var zeroValue string + r := &ReleaseVersion{BuildID: &zeroValue} + r.GetBuildID() + r = &ReleaseVersion{} + r.GetBuildID() + r = nil + r.GetBuildID() +} + +func TestReleaseVersion_GetPlatform(tt *testing.T) { + tt.Parallel() + var zeroValue string + r := &ReleaseVersion{Platform: &zeroValue} + r.GetPlatform() + r = &ReleaseVersion{} + r.GetPlatform() + r = nil + r.GetPlatform() +} + +func TestReleaseVersion_GetVersion(tt *testing.T) { + tt.Parallel() + var zeroValue string + r := &ReleaseVersion{Version: &zeroValue} + r.GetVersion() + r = &ReleaseVersion{} + r.GetVersion() + r = nil + r.GetVersion() +} + func TestRemoveToken_GetExpiresAt(tt *testing.T) { tt.Parallel() var zeroValue Timestamp @@ -30176,6 +32179,50 @@ func TestSponsorshipTier_GetFrom(tt *testing.T) { s.GetFrom() } +func TestSSHKeyStatus_GetHostname(tt *testing.T) { + tt.Parallel() + var zeroValue string + s := &SSHKeyStatus{Hostname: &zeroValue} + s.GetHostname() + s = &SSHKeyStatus{} + s.GetHostname() + s = nil + s.GetHostname() +} + +func TestSSHKeyStatus_GetMessage(tt *testing.T) { + tt.Parallel() + var zeroValue string + s := &SSHKeyStatus{Message: &zeroValue} + s.GetMessage() + s = &SSHKeyStatus{} + s.GetMessage() + s = nil + s.GetMessage() +} + +func TestSSHKeyStatus_GetModified(tt *testing.T) { + tt.Parallel() + var zeroValue bool + s := &SSHKeyStatus{Modified: &zeroValue} + s.GetModified() + s = &SSHKeyStatus{} + s.GetModified() + s = nil + s.GetModified() +} + +func TestSSHKeyStatus_GetUUID(tt *testing.T) { + tt.Parallel() + var zeroValue string + s := &SSHKeyStatus{UUID: &zeroValue} + s.GetUUID() + s = &SSHKeyStatus{} + s.GetUUID() + s = nil + s.GetUUID() +} + func TestSSHSigningKey_GetCreatedAt(tt *testing.T) { tt.Parallel() var zeroValue Timestamp @@ -30528,6 +32575,61 @@ func TestSubscription_GetURL(tt *testing.T) { s.GetURL() } +func TestSystemRequirements_GetStatus(tt *testing.T) { + tt.Parallel() + var zeroValue string + s := &SystemRequirements{Status: &zeroValue} + s.GetStatus() + s = &SystemRequirements{} + s.GetStatus() + s = nil + s.GetStatus() +} + +func TestSystemRequirementsNode_GetHostname(tt *testing.T) { + tt.Parallel() + var zeroValue string + s := &SystemRequirementsNode{Hostname: &zeroValue} + s.GetHostname() + s = &SystemRequirementsNode{} + s.GetHostname() + s = nil + s.GetHostname() +} + +func TestSystemRequirementsNode_GetStatus(tt *testing.T) { + tt.Parallel() + var zeroValue string + s := &SystemRequirementsNode{Status: &zeroValue} + s.GetStatus() + s = &SystemRequirementsNode{} + s.GetStatus() + s = nil + s.GetStatus() +} + +func TestSystemRequirementsNodeRoleStatus_GetRole(tt *testing.T) { + tt.Parallel() + var zeroValue string + s := &SystemRequirementsNodeRoleStatus{Role: &zeroValue} + s.GetRole() + s = &SystemRequirementsNodeRoleStatus{} + s.GetRole() + s = nil + s.GetRole() +} + +func TestSystemRequirementsNodeRoleStatus_GetStatus(tt *testing.T) { + tt.Parallel() + var zeroValue string + s := &SystemRequirementsNodeRoleStatus{Status: &zeroValue} + s.GetStatus() + s = &SystemRequirementsNodeRoleStatus{} + s.GetStatus() + s = nil + s.GetStatus() +} + func TestTag_GetMessage(tt *testing.T) { tt.Parallel() var zeroValue string