
// This file was autogenerated by go-to-protobuf. Do not edit it manually!

syntax = 'proto2';

package github.com.openshift.api.user.v1;

import "k8s.io/api/core/v1/generated.proto";
import "k8s.io/apimachinery/pkg/apis/meta/v1/generated.proto";
import "k8s.io/apimachinery/pkg/runtime/schema/generated.proto";
import "k8s.io/apimachinery/pkg/util/intstr/generated.proto";

// Package-wide variables from generator "generated".
option go_package = "v1";

// Group represents a referenceable set of Users
message Group {
  // Standard object's metadata.
  optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;

  // Users is the list of users in this group.
  optional OptionalNames users = 2;
}

// GroupList is a collection of Groups
message GroupList {
  // Standard object's metadata.
  optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;

  // Items is the list of groups
  repeated Group items = 2;
}

// Identity records a successful authentication of a user with an identity provider. The
// information about the source of authentication is stored on the identity, and the identity
// is then associated with a single user object. Multiple identities can reference a single
// user. Information retrieved from the authentication provider is stored in the extra field
// using a schema determined by the provider.
message Identity {
  // Standard object's metadata.
  optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;

  // ProviderName is the source of identity information
  optional string providerName = 2;

  // ProviderUserName uniquely represents this identity in the scope of the provider
  optional string providerUserName = 3;

  // User is a reference to the user this identity is associated with
  // Both Name and UID must be set
  optional k8s.io.api.core.v1.ObjectReference user = 4;

  // Extra holds extra information about this identity
  map<string, string> extra = 5;
}

// IdentityList is a collection of Identities
message IdentityList {
  // Standard object's metadata.
  optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;

  // Items is the list of identities
  repeated Identity items = 2;
}

// OptionalNames is an array that may also be left nil to distinguish between set and unset.
// +protobuf.nullable=true
// +protobuf.options.(gogoproto.goproto_stringer)=false
message OptionalNames {
  // items, if empty, will result in an empty slice

  repeated string items = 1;
}

// Upon log in, every user of the system receives a User and Identity resource. Administrators
// may directly manipulate the attributes of the users for their own tracking, or set groups
// via the API. The user name is unique and is chosen based on the value provided by the
// identity provider - if a user already exists with the incoming name, the user name may have
// a number appended to it depending on the configuration of the system.
message User {
  // Standard object's metadata.
  optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;

  // FullName is the full name of user
  optional string fullName = 2;

  // Identities are the identities associated with this user
  repeated string identities = 3;

  // Groups specifies group names this user is a member of.
  // This field is deprecated and will be removed in a future release.
  // Instead, create a Group object containing the name of this User.
  repeated string groups = 4;
}

// UserIdentityMapping maps a user to an identity
message UserIdentityMapping {
  // Standard object's metadata.
  optional k8s.io.apimachinery.pkg.apis.meta.v1.ObjectMeta metadata = 1;

  // Identity is a reference to an identity
  optional k8s.io.api.core.v1.ObjectReference identity = 2;

  // User is a reference to a user
  optional k8s.io.api.core.v1.ObjectReference user = 3;
}

// UserList is a collection of Users
message UserList {
  // Standard object's metadata.
  optional k8s.io.apimachinery.pkg.apis.meta.v1.ListMeta metadata = 1;

  // Items is the list of users
  repeated User items = 2;
}

