github.com/goharbor/go-client@v0.210.0/pkg/sdk/v2.0/models/user_group_search_item.go (about) 1 // Code generated by go-swagger; DO NOT EDIT. 2 3 package models 4 5 // This file was generated by the swagger tool. 6 // Editing this file might prove futile when you re-run the swagger generate command 7 8 import ( 9 "context" 10 11 "github.com/go-openapi/strfmt" 12 "github.com/go-openapi/swag" 13 ) 14 15 // UserGroupSearchItem user group search item 16 // 17 // swagger:model UserGroupSearchItem 18 type UserGroupSearchItem struct { 19 20 // The name of the user group 21 GroupName string `json:"group_name,omitempty"` 22 23 // The group type, 1 for LDAP group, 2 for HTTP group, 3 for OIDC group. 24 GroupType int64 `json:"group_type,omitempty"` 25 26 // The ID of the user group 27 ID int64 `json:"id,omitempty"` 28 } 29 30 // Validate validates this user group search item 31 func (m *UserGroupSearchItem) Validate(formats strfmt.Registry) error { 32 return nil 33 } 34 35 // ContextValidate validates this user group search item based on context it is used 36 func (m *UserGroupSearchItem) ContextValidate(ctx context.Context, formats strfmt.Registry) error { 37 return nil 38 } 39 40 // MarshalBinary interface implementation 41 func (m *UserGroupSearchItem) MarshalBinary() ([]byte, error) { 42 if m == nil { 43 return nil, nil 44 } 45 return swag.WriteJSON(m) 46 } 47 48 // UnmarshalBinary interface implementation 49 func (m *UserGroupSearchItem) UnmarshalBinary(b []byte) error { 50 var res UserGroupSearchItem 51 if err := swag.ReadJSON(b, &res); err != nil { 52 return err 53 } 54 *m = res 55 return nil 56 }