2024-10-07 14:20:25 +00:00
|
|
|
package session
|
|
|
|
|
|
|
|
import (
|
|
|
|
session "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/api/session/grpc"
|
|
|
|
)
|
|
|
|
|
|
|
|
// String returns string representation of ObjectSessionVerb.
|
|
|
|
func (x ObjectSessionVerb) String() string {
|
|
|
|
return ObjectSessionVerbToGRPCField(x).String()
|
|
|
|
}
|
|
|
|
|
|
|
|
// FromString parses ObjectSessionVerb from a string representation.
|
|
|
|
// It is a reverse action to String().
|
|
|
|
//
|
|
|
|
// Returns true if s was parsed successfully.
|
|
|
|
func (x *ObjectSessionVerb) FromString(s string) bool {
|
2024-12-26 07:03:55 +00:00
|
|
|
g, ok := session.ObjectSessionContext_Verb_value[s]
|
2024-10-07 14:20:25 +00:00
|
|
|
|
|
|
|
if ok {
|
2024-12-26 07:03:55 +00:00
|
|
|
*x = ObjectSessionVerbFromGRPCField(session.ObjectSessionContext_Verb(g))
|
2024-10-07 14:20:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return ok
|
|
|
|
}
|
|
|
|
|
|
|
|
// String returns string representation of ContainerSessionVerb.
|
|
|
|
func (x ContainerSessionVerb) String() string {
|
|
|
|
return ContainerSessionVerbToGRPCField(x).String()
|
|
|
|
}
|
|
|
|
|
|
|
|
// FromString parses ContainerSessionVerb from a string representation.
|
|
|
|
// It is a reverse action to String().
|
|
|
|
//
|
|
|
|
// Returns true if s was parsed successfully.
|
|
|
|
func (x *ContainerSessionVerb) FromString(s string) bool {
|
2024-12-26 07:03:55 +00:00
|
|
|
g, ok := session.ContainerSessionContext_Verb_value[s]
|
2024-10-07 14:20:25 +00:00
|
|
|
|
|
|
|
if ok {
|
2024-12-26 07:03:55 +00:00
|
|
|
*x = ContainerSessionVerbFromGRPCField(session.ContainerSessionContext_Verb(g))
|
2024-10-07 14:20:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return ok
|
|
|
|
}
|