Skip to content

Commit

Permalink
Added nextgen connectors
Browse files Browse the repository at this point in the history
  • Loading branch information
micahlmartin committed Dec 9, 2021
1 parent 7de4b1d commit 514f5a8
Show file tree
Hide file tree
Showing 742 changed files with 10,360 additions and 36,622 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ require (
github.com/opencontainers/image-spec v1.0.2
github.com/pkg/errors v0.9.1
github.com/stretchr/testify v1.7.0
golang.org/x/net v0.0.0-20211111160137-58aab5ef257a // indirect
golang.org/x/net v0.0.0-20211118161319-6a13c67c3ce4 // indirect
golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8
golang.org/x/sys v0.0.0-20210616094352-59db8d763f22 // indirect
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,8 @@ golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20211111160137-58aab5ef257a h1:c83jeVQW0KGKNaKBRfelNYNHaev+qawl9yaA825s8XE=
golang.org/x/net v0.0.0-20211111160137-58aab5ef257a/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20211118161319-6a13c67c3ce4 h1:DZshvxDdVoeKIbudAdFEKi+f70l51luSy/7b76ibTY0=
golang.org/x/net v0.0.0-20211118161319-6a13c67c3ce4/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
Expand Down
5 changes: 5 additions & 0 deletions harness/cd/graphql/model_delegate_scope.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package graphql

type DelegateScope struct {
Applications
}
1,102 changes: 226 additions & 876 deletions harness/nextgen/README.md

Large diffs are not rendered by default.

95 changes: 62 additions & 33 deletions harness/nextgen/api_authentication_settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ type AuthenticationSettingsApiService service
AuthenticationSettingsApiService Deletes Saml meta data by accountIdentifier
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *AuthenticationSettingsApiDeleteSamlMetaDataOpts - Optional Parameters:
* @param "AccountIdentifier" (optional.String) -
* @param "AccountIdentifier" (optional.String) - Account Identifier for the entity
@return RestResponseSsoConfig
*/

Expand Down Expand Up @@ -144,7 +144,7 @@ func (a *AuthenticationSettingsApiService) DeleteSamlMetaData(ctx context.Contex
AuthenticationSettingsApiService Get the authentication settings by accountIdentifier
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *AuthenticationSettingsApiGetAuthenticationSettingsOpts - Optional Parameters:
* @param "AccountIdentifier" (optional.String) -
* @param "AccountIdentifier" (optional.String) - Account Identifier for the entity
@return RestResponseAuthenticationSettingsResponse
*/

Expand Down Expand Up @@ -257,7 +257,7 @@ func (a *AuthenticationSettingsApiService) GetAuthenticationSettings(ctx context
AuthenticationSettingsApiService Get the password strength settings by accountIdentifier
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *AuthenticationSettingsApiGetPasswordStrengthSettingsOpts - Optional Parameters:
* @param "AccountIdentifier" (optional.String) -
* @param "AccountIdentifier" (optional.String) - Account Identifier for the entity
@return RestResponsePasswordStrengthPolicy
*/

Expand Down Expand Up @@ -370,7 +370,7 @@ func (a *AuthenticationSettingsApiService) GetPasswordStrengthSettings(ctx conte
AuthenticationSettingsApiService Get the Saml login test by accountId
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *AuthenticationSettingsApiGetSamlLoginTestOpts - Optional Parameters:
* @param "AccountId" (optional.String) -
* @param "AccountId" (optional.String) - Account Identifier for the entity
@return RestResponseLoginTypeResponse
*/

Expand Down Expand Up @@ -482,10 +482,10 @@ func (a *AuthenticationSettingsApiService) GetSamlLoginTest(ctx context.Context,
/*
AuthenticationSettingsApiService Updates the login settings
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param body This is the updated Login Settings. This should have all the fields not just the updated ones
* @param loginSettingsId
* @param body This is the updated Login Settings. Please provide values for all fields, not just the fields you are updating
* @param loginSettingsId Login Settings Identifier
* @param optional nil or *AuthenticationSettingsApiPutLoginSettingsOpts - Optional Parameters:
* @param "AccountIdentifier" (optional.String) -
* @param "AccountIdentifier" (optional.String) - Account Identifier for the entity
@return RestResponseLoginSettings
*/

Expand Down Expand Up @@ -601,7 +601,7 @@ func (a *AuthenticationSettingsApiService) PutLoginSettings(ctx context.Context,
AuthenticationSettingsApiService Deletes Oauth mechanism by accountIdentifier
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *AuthenticationSettingsApiRemoveOauthMechanismOpts - Optional Parameters:
* @param "AccountIdentifier" (optional.String) -
* @param "AccountIdentifier" (optional.String) - Account Identifier for the entity
@return RestResponseBoolean
*/

Expand Down Expand Up @@ -715,7 +715,7 @@ AuthenticationSettingsApiService set two factor auth at account lever by account
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *AuthenticationSettingsApiSetTwoFactorAuthAtAccountLevelOpts - Optional Parameters:
* @param "Body" (optional.Interface of TwoFactorAdminOverrideSettings) -
* @param "AccountIdentifier" (optional.String) -
* @param "AccountIdentifier" (optional.String) - Account Identifier for the entity
@return RestResponseBoolean
*/

Expand Down Expand Up @@ -835,8 +835,8 @@ func (a *AuthenticationSettingsApiService) SetTwoFactorAuthAtAccountLevel(ctx co
AuthenticationSettingsApiService Updates the Auth mechanism by accountIdentifier
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *AuthenticationSettingsApiUpdateAuthMechanismOpts - Optional Parameters:
* @param "AccountIdentifier" (optional.String) -
* @param "AuthenticationMechanism" (optional.String) -
* @param "AccountIdentifier" (optional.String) - Account Identifier for the entity
* @param "AuthenticationMechanism" (optional.String) - Type of Authentication Mechanism SSO or NON_SSO
@return RestResponseBoolean
*/

Expand Down Expand Up @@ -954,7 +954,7 @@ AuthenticationSettingsApiService Updates the Oauth providers by accountIdentifie
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *AuthenticationSettingsApiUpdateOauthProvidersOpts - Optional Parameters:
* @param "Body" (optional.Interface of OAuthSettings) -
* @param "AccountIdentifier" (optional.String) -
* @param "AccountIdentifier" (optional.String) - Account Identifier for the entity
@return RestResponseBoolean
*/

Expand Down Expand Up @@ -1071,15 +1071,16 @@ func (a *AuthenticationSettingsApiService) UpdateOauthProviders(ctx context.Cont
}

/*
AuthenticationSettingsApiService Uploads the saml metadata by accountId
AuthenticationSettingsApiService Updates the saml metadata by accountId
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *AuthenticationSettingsApiUpdateSamlMetaDataOpts - Optional Parameters:
* @param "File" (optional.Interface of FormDataContentDisposition) -
* @param "DisplayName" (optional.String) -
* @param "GroupMembershipAttr" (optional.String) -
* @param "AuthorizationEnabled" (optional.Bool) -
* @param "LogoutUrl" (optional.String) -
* @param "AccountId" (optional.String) -
* @param "EntityIdentifier" (optional.String) -
* @param "AccountId" (optional.String) - Account Identifier for the entity
@return RestResponseSsoConfig
*/

Expand All @@ -1089,6 +1090,7 @@ type AuthenticationSettingsApiUpdateSamlMetaDataOpts struct {
GroupMembershipAttr optional.String
AuthorizationEnabled optional.Bool
LogoutUrl optional.String
EntityIdentifier optional.String
AccountId optional.String
}

Expand Down Expand Up @@ -1143,6 +1145,9 @@ func (a *AuthenticationSettingsApiService) UpdateSamlMetaData(ctx context.Contex
if localVarOptionals != nil && localVarOptionals.LogoutUrl.IsSet() {
localVarFormParams.Add("logoutUrl", parameterToString(localVarOptionals.LogoutUrl.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.EntityIdentifier.IsSet() {
localVarFormParams.Add("entityIdentifier", parameterToString(localVarOptionals.EntityIdentifier.Value(), ""))
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
if err != nil {
return localVarReturnValue, nil, err
Expand Down Expand Up @@ -1212,8 +1217,8 @@ func (a *AuthenticationSettingsApiService) UpdateSamlMetaData(ctx context.Contex
AuthenticationSettingsApiService Updates the Whitelisted domains by accountIdentifier
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *AuthenticationSettingsApiUpdateWhitelistedDomainsOpts - Optional Parameters:
* @param "Body" (optional.Interface of []string) - Set of whiteListed domains that needs to be for the account
* @param "AccountIdentifier" (optional.String) -
* @param "Body" (optional.Interface of []string) - Set of whitelisted domains and IPs for the account
* @param "AccountIdentifier" (optional.String) - Account Identifier for the entity
@return RestResponseBoolean
*/

Expand Down Expand Up @@ -1330,16 +1335,17 @@ func (a *AuthenticationSettingsApiService) UpdateWhitelistedDomains(ctx context.
}

/*
AuthenticationSettingsApiService
AuthenticationSettingsApiService Uploads the saml metadata by accountId
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param optional nil or *AuthenticationSettingsApiUploadSamlMetaDataOpts - Optional Parameters:
* @param "File" (optional.Interface of FormDataContentDisposition) -
* @param "DisplayName" (optional.String) -
* @param "GroupMembershipAttr" (optional.String) -
* @param "AuthorizationEnabled" (optional.Bool) -
* @param "LogoutUrl" (optional.String) -
* @param "AccountId" (optional.String) -
* @param "EntityIdentifier" (optional.String) -
* @param "AccountId" (optional.String) - Account Identifier for the entity
@return RestResponseSsoConfig
*/

type AuthenticationSettingsApiUploadSamlMetaDataOpts struct {
Expand All @@ -1348,15 +1354,17 @@ type AuthenticationSettingsApiUploadSamlMetaDataOpts struct {
GroupMembershipAttr optional.String
AuthorizationEnabled optional.Bool
LogoutUrl optional.String
EntityIdentifier optional.String
AccountId optional.String
}

func (a *AuthenticationSettingsApiService) UploadSamlMetaData(ctx context.Context, localVarOptionals *AuthenticationSettingsApiUploadSamlMetaDataOpts) (*http.Response, error) {
func (a *AuthenticationSettingsApiService) UploadSamlMetaData(ctx context.Context, localVarOptionals *AuthenticationSettingsApiUploadSamlMetaDataOpts) (RestResponseSsoConfig, *http.Response, error) {
var (
localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
localVarHttpMethod = strings.ToUpper("Post")
localVarPostBody interface{}
localVarFileName string
localVarFileBytes []byte
localVarReturnValue RestResponseSsoConfig
)

// create path and map variables
Expand Down Expand Up @@ -1401,20 +1409,31 @@ func (a *AuthenticationSettingsApiService) UploadSamlMetaData(ctx context.Contex
if localVarOptionals != nil && localVarOptionals.LogoutUrl.IsSet() {
localVarFormParams.Add("logoutUrl", parameterToString(localVarOptionals.LogoutUrl.Value(), ""))
}
if localVarOptionals != nil && localVarOptionals.EntityIdentifier.IsSet() {
localVarFormParams.Add("entityIdentifier", parameterToString(localVarOptionals.EntityIdentifier.Value(), ""))
}
r, err := a.client.prepareRequest(ctx, localVarPath, localVarHttpMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, localVarFileName, localVarFileBytes)
if err != nil {
return nil, err
return localVarReturnValue, nil, err
}

localVarHttpResponse, err := a.client.callAPI(r)
if err != nil || localVarHttpResponse == nil {
return localVarHttpResponse, err
return localVarReturnValue, localVarHttpResponse, err
}

localVarBody, err := ioutil.ReadAll(localVarHttpResponse.Body)
localVarHttpResponse.Body.Close()
if err != nil {
return localVarHttpResponse, err
return localVarReturnValue, localVarHttpResponse, err
}

if localVarHttpResponse.StatusCode < 300 {
// If we succeed, return the data, otherwise pass on to decode error.
err = a.client.decode(&localVarReturnValue, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err == nil {
return localVarReturnValue, localVarHttpResponse, err
}
}

if localVarHttpResponse.StatusCode >= 300 {
Expand All @@ -1427,23 +1446,33 @@ func (a *AuthenticationSettingsApiService) UploadSamlMetaData(ctx context.Contex
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
return localVarHttpResponse, newErr
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr
return localVarReturnValue, localVarHttpResponse, newErr
}
if localVarHttpResponse.StatusCode == 500 {
var v ModelError
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
return localVarHttpResponse, newErr
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarReturnValue, localVarHttpResponse, newErr
}
if localVarHttpResponse.StatusCode == 0 {
var v RestResponseSsoConfig
err = a.client.decode(&v, localVarBody, localVarHttpResponse.Header.Get("Content-Type"))
if err != nil {
newErr.error = err.Error()
return localVarReturnValue, localVarHttpResponse, newErr
}
newErr.model = v
return localVarHttpResponse, newErr
return localVarReturnValue, localVarHttpResponse, newErr
}
return localVarHttpResponse, newErr
return localVarReturnValue, localVarHttpResponse, newErr
}

return localVarHttpResponse, nil
return localVarReturnValue, localVarHttpResponse, nil
}
Loading

0 comments on commit 514f5a8

Please sign in to comment.