github.com/vmware/govmomi@v0.37.2/ssoadmin/types/role.go (about)

     1  /*
     2  Copyright (c) 2018 VMware, Inc. All Rights Reserved.
     3  
     4  Licensed under the Apache License, Version 2.0 (the "License");
     5  you may not use this file except in compliance with the License.
     6  You may obtain a copy of the License at
     7  
     8      http://www.apache.org/licenses/LICENSE-2.0
     9  
    10  Unless required by applicable law or agreed to in writing, software
    11  distributed under the License is distributed on an "AS IS" BASIS,
    12  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    13  See the License for the specific language governing permissions and
    14  limitations under the License.
    15  */
    16  
    17  package types
    18  
    19  import (
    20  	"reflect"
    21  
    22  	"github.com/vmware/govmomi/vim25/types"
    23  )
    24  
    25  // Types here are not included in the wsdl
    26  
    27  const (
    28  	RoleActAsUser     = "ActAsUser"
    29  	RoleRegularUser   = "RegularUser"
    30  	RoleAdministrator = "Administrator"
    31  )
    32  
    33  type GrantWSTrustRole GrantWSTrustRoleRequestType
    34  
    35  func init() {
    36  	types.Add("sso:GrantWSTrustRole", reflect.TypeOf((*GrantWSTrustRole)(nil)).Elem())
    37  }
    38  
    39  type GrantWSTrustRoleRequestType struct {
    40  	This   types.ManagedObjectReference `xml:"_this"`
    41  	UserId PrincipalId                  `xml:"userId"`
    42  	Role   string                       `xml:"role"`
    43  }
    44  
    45  func init() {
    46  	types.Add("sso:GrantWSTrustRoleRequestType", reflect.TypeOf((*GrantWSTrustRoleRequestType)(nil)).Elem())
    47  }
    48  
    49  type GrantWSTrustRoleResponse struct {
    50  	Returnval bool `xml:"returnval"`
    51  }
    52  
    53  type RevokeWSTrustRole RevokeWSTrustRoleRequestType
    54  
    55  func init() {
    56  	types.Add("sso:RevokeWSTrustRole", reflect.TypeOf((*RevokeWSTrustRole)(nil)).Elem())
    57  }
    58  
    59  type RevokeWSTrustRoleRequestType struct {
    60  	This   types.ManagedObjectReference `xml:"_this"`
    61  	UserId PrincipalId                  `xml:"userId"`
    62  	Role   string                       `xml:"role"`
    63  }
    64  
    65  func init() {
    66  	types.Add("sso:RevokeWSTrustRoleRequestType", reflect.TypeOf((*RevokeWSTrustRoleRequestType)(nil)).Elem())
    67  }
    68  
    69  type RevokeWSTrustRoleResponse struct {
    70  	Returnval bool `xml:"returnval"`
    71  }