//
// Return values:
//
// * NewLinkType: allowed values: PPP_Dialup
16835
func (client *WANPOTSLinkConfig1) GetISPInfo() (NewISPPhoneNumber string, NewISPInfo string, NewLinkType string, err error) {
	// Request structure.
	request := interface{}(nil)
	// BEGIN Marshal arguments into request.

	// END Marshal arguments into request.

	// Response structure.
	response := &struct {
		NewISPPhoneNumber string
		NewISPInfo        string
		NewLinkType       string
	}{}

	// Perform the SOAP call.
	if err = client.SOAPClient.PerformAction(URN_WANPOTSLinkConfig_1, "GetISPInfo", request, response); err != nil {
		return
	}

	// BEGIN Unmarshal arguments from response.

	if NewISPPhoneNumber, err = soap.UnmarshalString(response.NewISPPhoneNumber); err != nil {
		return
	}
	if NewISPInfo, err = soap.UnmarshalString(response.NewISPInfo); err != nil {
		return
	}
	if NewLinkType, err = soap.UnmarshalString(response.NewLinkType); err != nil {
		return
	}
	// END Unmarshal arguments from response.
	return
}
820520
func (client *WANPPPConnection1) GetConnectionTypeInfo() (NewConnectionType string, NewPossibleConnectionTypes string, err error) {
	// Request structure.
	request := interface{}(nil)
	// BEGIN Marshal arguments into request.

	// END Marshal arguments into request.

	// Response structure.
	response := &struct {
		NewConnectionType          string
		NewPossibleConnectionTypes string
	}{}

	// Perform the SOAP call.
	if err = client.SOAPClient.PerformAction(URN_WANPPPConnection_1, "GetConnectionTypeInfo", request, response); err != nil {
		return
	}

	// BEGIN Unmarshal arguments from response.

	if NewConnectionType, err = soap.UnmarshalString(response.NewConnectionType); err != nil {
		return
	}
	if NewPossibleConnectionTypes, err = soap.UnmarshalString(response.NewPossibleConnectionTypes); err != nil {
		return
	}
	// END Unmarshal arguments from response.
	return
}
356190
func NewNetlinkRequest(proto, flags int) *NetlinkRequest {
	return &NetlinkRequest{
		NlMsghdr: unix.NlMsghdr{
			Len:   uint32(unix.SizeofNlMsghdr),
			Type:  uint16(proto),
			Flags: unix.NLM_F_REQUEST | uint16(flags),
			Seq:   atomic.AddUint32(&nextSeqNr, 1),
		},
	}
}
501084
func NewRevokeLinkedAppStatus(Success bool) *RevokeLinkedAppStatus {
	s := new(RevokeLinkedAppStatus)
	s.Success = Success
	return s
}
11258
func (c ConstantBool) Link(scope Scope, t TypeSpec) (ConstantValue, error) {
	if _, ok := RootTypeSpec(t).(*BoolSpec); !ok {
		return nil, constantValueCastError{Value: c, Type: t}
	}
	return c, nil
}
243930
func NewAppUnlinkTeamType(Description string) *AppUnlinkTeamType {
	s := new(AppUnlinkTeamType)
	s.Description = Description
	return s
}
1323851
func NewSharedLinkAddExpiryType(Description string) *SharedLinkAddExpiryType {
	s := new(SharedLinkAddExpiryType)
	s.Description = Description
	return s
}
920512
func NewGetSharedLinksResult(Links []IsLinkMetadata) *GetSharedLinksResult {
	s := new(GetSharedLinksResult)
	s.Links = Links
	return s
}
1041007
func (r User_Customer_OpenIdConnect) InviteUserToLinkOpenIdConnect(providerType *string) (err error) {
	var resp datatypes.Void
	params := []interface{}{
		providerType,
	}
	err = r.Session.DoRequest("SoftLayer_User_Customer_OpenIdConnect", "inviteUserToLinkOpenIdConnect", params, &r.Options, &resp)
	return
}
733282
func (f *linkingProviderFactoryImpl) NewLinkingProvider(ctx context.Context, identityID uuid.UUID, authURL string, forResource string) (provider.LinkingProvider, error) {
	// Check if the forResource is actually a provider alias like "github" or "openshift"
	if forResource == provider.GitHubProviderAlias {
		return provider.NewGitHubIdentityProvider(f.config.GetGitHubClientID(), f.config.GetGitHubClientSecret(), f.config.GetGitHubClientDefaultScopes(), authURL), nil
	}
	if forResource == provider.OpenShiftProviderAlias {
		// Look up the user's OpenShift cluster
		var clusterURL string
		err := f.ExecuteInTransaction(func() error {
			identities, err := f.Repositories().Identities().Query(account.IdentityFilterByID(identityID), account.IdentityWithUser())
			if err != nil {
				return err
			}
			if len(identities) == 0 {
				return errors.New("identity not found")
			}
			if identities[0].User.ID == uuid.Nil {
				return errors.New("unable to load user for identity")
			}
			clusterURL = identities[0].User.Cluster
			log.Debug(ctx, map[string]interface{}{"cluster_url": clusterURL, "identity_id": identityID}, "looking up cluster for identity")
			return nil

		})
		if err != nil {
			log.Error(ctx, map[string]interface{}{
				"identity_id": identityID,
				"err":         err,
			}, "unable to lookup user's cluster URL for identity %s", identityID)
			return nil, errs.NewUnauthorizedError(err.Error())
		}

		cluster, err := f.Services().ClusterService().ClusterByURL(ctx, clusterURL)
		if err != nil {
			return nil, errs.NewInternalError(ctx, err)
		}
		if cluster == nil {
			log.Error(ctx, map[string]interface{}{
				"for":         forResource,
				"cluster_url": clusterURL,
			}, "unable to find oauth config for provider alias")
			return nil, errs.NewInternalErrorFromString(ctx, fmt.Sprintf("unable to load provider for cluster URL %s", clusterURL))
		}
		return provider.NewOpenShiftIdentityProvider(*cluster, authURL)
	}

	// Check if the forResource is some known resource URL like "https://github.com" or "https://api.starter-us-east-2.openshift.com"
	resourceURL, err := url.Parse(forResource)
	if err != nil {
		return nil, err
	}
	if resourceURL.Host == "github.com" {
		return provider.NewGitHubIdentityProvider(f.config.GetGitHubClientID(), f.config.GetGitHubClientSecret(),
			f.config.GetGitHubClientDefaultScopes(), authURL), nil
	}
	cluster, err := f.Services().ClusterService().ClusterByURL(ctx, forResource)
	if err != nil {
		return nil, errs.NewInternalError(ctx, err)
	}
	if cluster != nil {
		return provider.NewOpenShiftIdentityProvider(*cluster, authURL)
	}
	log.Error(ctx, map[string]interface{}{
		"for": forResource,
	}, "unable to find oauth config for resource")
	return nil, errs.NewBadParameterError("for", forResource).Expected("URL to a github.com or openshift.com resource")
}
870105
func (c *JSONConnection) newOfType() reflect.Value {
	return reflect.New(c.Sender.Type().Elem().Elem())
}
518944
func NewFastWebsocketDialer(handler fasthttp.RequestHandler) *websocket.Dialer {
	return &websocket.Dialer{
		NetDial: func(network, addr string) (net.Conn, error) {
			hc := newHandlerConn()
			hc.runFastHandler(handler)
			return hc, nil
		},
	}
}
129569
func (s *LDAPService) NewLinkDomainToLdapParams(accounttype int, domainid string, lDAPType string) *LinkDomainToLdapParams {
	p := &LinkDomainToLdapParams{}
	p.p = make(map[string]interface{})
	p.p["accounttype"] = accounttype
	p.p["domainid"] = domainid
	p.p["type"] = lDAPType
	return p
}
749898
func (m *MonitorValues) FlattenDownlinkBPSValue() ([]FlatMonitorValue, error) {
	return m.flattenValue(func(v *MonitorValue) *float64 { return v.DownlinkBPS })
}
850475
func NewLinksOrReferences(in interface{}, context *compiler.Context) (*LinksOrReferences, error) {
	errors := make([]error, 0)
	x := &LinksOrReferences{}
	m, ok := compiler.UnpackMap(in)
	if !ok {
		message := fmt.Sprintf("has unexpected value: %+v (%T)", in, in)
		errors = append(errors, compiler.NewError(context, message))
	} else {
		// repeated NamedLinkOrReference additional_properties = 1;
		// MAP: LinkOrReference
		x.AdditionalProperties = make([]*NamedLinkOrReference, 0)
		for _, item := range m {
			k, ok := compiler.StringValue(item.Key)
			if ok {
				v := item.Value
				pair := &NamedLinkOrReference{}
				pair.Name = k
				var err error
				pair.Value, err = NewLinkOrReference(v, compiler.NewContext(k, context))
				if err != nil {
					errors = append(errors, err)
				}
				x.AdditionalProperties = append(x.AdditionalProperties, pair)
			}
		}
	}
	return x, compiler.NewErrorGroupOrNil(errors)
}
1157331
func NewSharedLinkCreateType(Description string) *SharedLinkCreateType {
	s := new(SharedLinkCreateType)
	s.Description = Description
	return s
}
561938
func NewAppUnlinkUserDetails(AppInfo IsAppLogInfo) *AppUnlinkUserDetails {
	s := new(AppUnlinkUserDetails)
	s.AppInfo = AppInfo
	return s
}