diff --git a/accounts/pkg/proto/v0/accounts.mock.go b/accounts/pkg/proto/v0/accounts.mock.go deleted file mode 100644 index a11b49313..000000000 --- a/accounts/pkg/proto/v0/accounts.mock.go +++ /dev/null @@ -1,89 +0,0 @@ -package proto - -import ( - context "context" - - client "go-micro.dev/v4/client" - empty "google.golang.org/protobuf/types/known/emptypb" -) - -// MockAccountsService can be used to write tests -/* -To create a mock overwrite the functions of an instance like this: - -```go -func mockAccSvc(retErr bool) proto.AccountsService { - if retErr { - return &proto.MockAccountsService{ - ListFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) { - return nil, fmt.Errorf("error returned by mockAccountsService LIST") - }, - } - } - - return &proto.MockAccountsService{ - ListFunc: func(ctx context.Context, in *proto.ListAccountsRequest, opts ...client.CallOption) (out *proto.ListAccountsResponse, err error) { - return &proto.ListAccountsResponse{ - Accounts: []*proto.Account{ - { - Id: "yay", - }, - }, - }, nil - }, - } -} -``` -*/ -type MockAccountsService struct { - ListFunc func(ctx context.Context, in *ListAccountsRequest, opts ...client.CallOption) (*ListAccountsResponse, error) - GetFunc func(ctx context.Context, in *GetAccountRequest, opts ...client.CallOption) (*Account, error) - CreateFunc func(ctx context.Context, in *CreateAccountRequest, opts ...client.CallOption) (*Account, error) - UpdateFunc func(ctx context.Context, in *UpdateAccountRequest, opts ...client.CallOption) (*Account, error) - DeleteFunc func(ctx context.Context, in *DeleteAccountRequest, opts ...client.CallOption) (*empty.Empty, error) -} - -// ListAccounts will panic if the function has been called, but not mocked -func (m MockAccountsService) ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...client.CallOption) (*ListAccountsResponse, error) { - if m.ListFunc != nil { - return m.ListFunc(ctx, in, opts...) - } - - panic("ListFunc was called in test but not mocked") -} - -// GetAccount will panic if the function has been called, but not mocked -func (m MockAccountsService) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...client.CallOption) (*Account, error) { - if m.GetFunc != nil { - return m.GetFunc(ctx, in, opts...) - } - - panic("GetFunc was called in test but not mocked") -} - -// CreateAccount will panic if the function has been called, but not mocked -func (m MockAccountsService) CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...client.CallOption) (*Account, error) { - if m.CreateFunc != nil { - return m.CreateFunc(ctx, in, opts...) - } - - panic("CreateFunc was called in test but not mocked") -} - -// UpdateAccount will panic if the function has been called, but not mocked -func (m MockAccountsService) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...client.CallOption) (*Account, error) { - if m.UpdateFunc != nil { - return m.UpdateFunc(ctx, in, opts...) - } - - panic("UpdateFunc was called in test but not mocked") -} - -// DeleteAccount will panic if the function has been called, but not mocked -func (m MockAccountsService) DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...client.CallOption) (*empty.Empty, error) { - if m.DeleteFunc != nil { - return m.DeleteFunc(ctx, in, opts...) - } - - panic("DeleteFunc was called in test but not mocked") -} diff --git a/accounts/pkg/proto/v0/accounts.pb.go b/accounts/pkg/proto/v0/accounts.pb.go deleted file mode 100644 index fd1a39173..000000000 --- a/accounts/pkg/proto/v0/accounts.pb.go +++ /dev/null @@ -1,2842 +0,0 @@ -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.1 -// protoc v3.17.3 -// source: proto/v0/accounts.proto - -package proto - -import ( - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - emptypb "google.golang.org/protobuf/types/known/emptypb" - fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - reflect "reflect" - sync "sync" -) - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -type RebuildIndexRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RebuildIndexRequest) Reset() { - *x = RebuildIndexRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RebuildIndexRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RebuildIndexRequest) ProtoMessage() {} - -func (x *RebuildIndexRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RebuildIndexRequest.ProtoReflect.Descriptor instead. -func (*RebuildIndexRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{0} -} - -type RebuildIndexResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *RebuildIndexResponse) Reset() { - *x = RebuildIndexResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RebuildIndexResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RebuildIndexResponse) ProtoMessage() {} - -func (x *RebuildIndexResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RebuildIndexResponse.ProtoReflect.Descriptor instead. -func (*RebuildIndexResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{1} -} - -type ListAccountsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Optional. The maximum number of accounts to return in the response - PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Optional. A pagination token returned from a previous call to `Get` - // that indicates from where search should continue - PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - // Optional. Used to specify a subset of fields that should be - // returned by a get operation or modified by an update operation. - FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` - // Optional. Search criteria used to select the accounts to return. - // If no search criteria is specified then all accounts will be - // returned - // - // TODO update query language - // Query expressions can be used to restrict results based upon - // the account properties where the operators `=`, `NOT`, `AND` and `OR` - // can be used along with the suffix wildcard symbol `*`. - // - // The string properties in a query expression should use escaped quotes - // for values that include whitespace to prevent unexpected behavior. - // - // Some example queries are: - // - // * Query `display_name=Th*` returns accounts whose display_name - // starts with "Th" - // * Query `email=foo@example.com` returns accounts with - // `email` set to `foo@example.com` - // * Query `display_name=\\"Test String\\"` returns accounts with - // display names that include both "Test" and "String" - Query string `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"` -} - -func (x *ListAccountsRequest) Reset() { - *x = ListAccountsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListAccountsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListAccountsRequest) ProtoMessage() {} - -func (x *ListAccountsRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListAccountsRequest.ProtoReflect.Descriptor instead. -func (*ListAccountsRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{2} -} - -func (x *ListAccountsRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListAccountsRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -func (x *ListAccountsRequest) GetFieldMask() *fieldmaskpb.FieldMask { - if x != nil { - return x.FieldMask - } - return nil -} - -func (x *ListAccountsRequest) GetQuery() string { - if x != nil { - return x.Query - } - return "" -} - -type ListAccountsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The field name should match the noun "accounts" in the method name. There - // will be a maximum number of items returned based on the page_size field - // in the request - Accounts []*Account `protobuf:"bytes,1,rep,name=accounts,proto3" json:"accounts,omitempty"` - // Token to retrieve the next page of results, or empty if there are no - // more results in the list - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` -} - -func (x *ListAccountsResponse) Reset() { - *x = ListAccountsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListAccountsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListAccountsResponse) ProtoMessage() {} - -func (x *ListAccountsResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListAccountsResponse.ProtoReflect.Descriptor instead. -func (*ListAccountsResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{3} -} - -func (x *ListAccountsResponse) GetAccounts() []*Account { - if x != nil { - return x.Accounts - } - return nil -} - -func (x *ListAccountsResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -type GetAccountRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetAccountRequest) Reset() { - *x = GetAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetAccountRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetAccountRequest) ProtoMessage() {} - -func (x *GetAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetAccountRequest.ProtoReflect.Descriptor instead. -func (*GetAccountRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{4} -} - -func (x *GetAccountRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type CreateAccountRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The account resource to create - Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` -} - -func (x *CreateAccountRequest) Reset() { - *x = CreateAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateAccountRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateAccountRequest) ProtoMessage() {} - -func (x *CreateAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateAccountRequest.ProtoReflect.Descriptor instead. -func (*CreateAccountRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{5} -} - -func (x *CreateAccountRequest) GetAccount() *Account { - if x != nil { - return x.Account - } - return nil -} - -type UpdateAccountRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The account resource which replaces the resource on the server - Account *Account `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"` - // The update mask applies to the resource. For the `FieldMask` definition, - // see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` -} - -func (x *UpdateAccountRequest) Reset() { - *x = UpdateAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateAccountRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateAccountRequest) ProtoMessage() {} - -func (x *UpdateAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateAccountRequest.ProtoReflect.Descriptor instead. -func (*UpdateAccountRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{6} -} - -func (x *UpdateAccountRequest) GetAccount() *Account { - if x != nil { - return x.Account - } - return nil -} - -func (x *UpdateAccountRequest) GetUpdateMask() *fieldmaskpb.FieldMask { - if x != nil { - return x.UpdateMask - } - return nil -} - -type DeleteAccountRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *DeleteAccountRequest) Reset() { - *x = DeleteAccountRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteAccountRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteAccountRequest) ProtoMessage() {} - -func (x *DeleteAccountRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteAccountRequest.ProtoReflect.Descriptor instead. -func (*DeleteAccountRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{7} -} - -func (x *DeleteAccountRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -// Account follows the properties of the ms graph api user resource. -// See https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0#properties -type Account struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The unique identifier for the user. Key. Not nullable. Non reassignable. Read-only. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // *true* if the account is enabled; otherwise, *false*. This property is required when a user is created. Supports $filter. - AccountEnabled bool `protobuf:"varint,2,opt,name=account_enabled,json=accountEnabled,proto3" json:"account_enabled,omitempty"` - // A resource account is also known as a /disabled user object/ in Azure AD, and can be used to represent resources in general. - // In Exchange it might be used to represent conference rooms, for example, and allow them to have a phone number. - // You could give printers or machines with a sync client resource accounts as well. - // A resource account can be homed in Microsoft 365 or on premises using Skype for Business Server 2019. - // *true* if the user is a resource account; otherwise, *false*. Null value should be considered false. - IsResourceAccount bool `protobuf:"varint,3,opt,name=is_resource_account,json=isResourceAccount,proto3" json:"is_resource_account,omitempty"` - // Indicates whether the account was created as - // - a regular school or work account ("" / emptystring), - // - a local account, fully managed by oCIS (LocalAccount), includes synced accounts or - // - an external account (Invitation), - // - self-service sign-up using email verification (EmailVerified). Read-only. - CreationType string `protobuf:"bytes,4,opt,name=creation_type,json=creationType,proto3" json:"creation_type,omitempty"` - // Represents the identities that can be used to sign in to this account. - // An identity can be provided by oCIS (also known as a local account), by organizations, or by social identity providers such as Facebook, Google, and Microsoft, and is tied to an account. - // May contain multiple items with the same signInType value. Supports $filter. - Identities []*Identities `protobuf:"bytes,5,rep,name=identities,proto3" json:"identities,omitempty"` - // The name displayed in the address book for the account. - // This is usually the combination of the user's first name, middle initial and last name. - // This property is required when a user is created and it cannot be cleared during updates. - // Supports $filter and $orderby. - // posixaccount MUST cn - DisplayName string `protobuf:"bytes,6,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` - // The username - // posixaccount MUST uid - PreferredName string `protobuf:"bytes,7,opt,name=preferred_name,json=preferredName,proto3" json:"preferred_name,omitempty"` - // TODO rename to on_premise_? or move to extension? see https://docs.microsoft.com/en-us/graph/extensibility-open-users - // used for exposing the user using ldap - // posixaccount MUST uidnumber - UidNumber int64 `protobuf:"varint,8,opt,name=uid_number,json=uidNumber,proto3" json:"uid_number,omitempty"` - // used for exposing the user using ldap - // posixaccount MUST gidnumber - GidNumber int64 `protobuf:"varint,9,opt,name=gid_number,json=gidNumber,proto3" json:"gid_number,omitempty"` - // The SMTP address for the user, for example, "jeff@contoso.onmicrosoft.com". Read-Only. Supports $filter. - // inetorgperson MAY mail - Mail string `protobuf:"bytes,10,opt,name=mail,proto3" json:"mail,omitempty"` - // A description, useful for resource accounts - // posixaccount MAY description - Description string `protobuf:"bytes,11,opt,name=description,proto3" json:"description,omitempty"` - // Specifies the password profile for the user. - // The profile contains the user’s password. This property is required when a user is created. - // The password in the profile must satisfy minimum requirements as specified by the passwordPolicies property. - // By default, a strong password is required. - // posixaccount MAY authPassword - PasswordProfile *PasswordProfile `protobuf:"bytes,12,opt,name=password_profile,json=passwordProfile,proto3" json:"password_profile,omitempty"` - // The groups, directory roles and administrative units that the user is a member of. Read-only. Nullable. - // should we only respond with repeated strings of ids? no clients should a proper filter mask! - MemberOf []*Group `protobuf:"bytes,13,rep,name=memberOf,proto3" json:"memberOf,omitempty"` - // The created date of the account object. - CreatedDateTime *timestamppb.Timestamp `protobuf:"bytes,16,opt,name=created_date_time,json=createdDateTime,proto3" json:"created_date_time,omitempty"` - // The date and time the user was deleted. Returned only on $select. - DeletedDateTime *timestamppb.Timestamp `protobuf:"bytes,17,opt,name=deleted_date_time,json=deletedDateTime,proto3" json:"deleted_date_time,omitempty"` - // *true* if this object is synced from an on-premises directory; - // *false* if this object was originally synced from an on-premises directory but is no longer synced; - // null if this object has never been synced from an on-premises directory (default). Read-only - OnPremisesSyncEnabled bool `protobuf:"varint,20,opt,name=on_premises_sync_enabled,json=onPremisesSyncEnabled,proto3" json:"on_premises_sync_enabled,omitempty"` - // This property is used to associate an on-premises LDAP user to the oCIS account object. - // This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user’s userPrincipalName (UPN) property. - // Important: The $ and _ characters cannot be used when specifying this property. Supports $filter. - OnPremisesImmutableId string `protobuf:"bytes,21,opt,name=on_premises_immutable_id,json=onPremisesImmutableId,proto3" json:"on_premises_immutable_id,omitempty"` - // Contains the on-premises security identifier (SID) for the user that was synchronized from on-premises to the cloud. Read-only. - OnPremisesSecurityIdentifier string `protobuf:"bytes,22,opt,name=on_premises_security_identifier,json=onPremisesSecurityIdentifier,proto3" json:"on_premises_security_identifier,omitempty"` - // Contains the on-premises LDAP `distinguished name` or `DN`. - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. - OnPremisesDistinguishedName string `protobuf:"bytes,23,opt,name=on_premises_distinguished_name,json=onPremisesDistinguishedName,proto3" json:"on_premises_distinguished_name,omitempty"` - // Contains the on-premises `samAccountName` synchronized from the on-premises directory. - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. - OnPremisesSamAccountName string `protobuf:"bytes,24,opt,name=on_premises_sam_account_name,json=onPremisesSamAccountName,proto3" json:"on_premises_sam_account_name,omitempty"` - // Contains the on-premises `domainFQDN`, also called `dnsDomainName` synchronized from the on-premises directory - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. - OnPremisesDomainName string `protobuf:"bytes,25,opt,name=on_premises_domain_name,json=onPremisesDomainName,proto3" json:"on_premises_domain_name,omitempty"` - // Contains the on-premises userPrincipalName synchronized from the on-premises directory. - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. - OnPremisesUserPrincipalName string `protobuf:"bytes,26,opt,name=on_premises_user_principal_name,json=onPremisesUserPrincipalName,proto3" json:"on_premises_user_principal_name,omitempty"` - // Indicates the last time at which the object was synced with the on-premises directory; Read-only. - OnPremisesLastSyncDateTime *timestamppb.Timestamp `protobuf:"bytes,28,opt,name=on_premises_last_sync_date_time,json=onPremisesLastSyncDateTime,proto3" json:"on_premises_last_sync_date_time,omitempty"` - // Errors when using synchronization during provisioning. - OnPremisesProvisioningErrors []*OnPremisesProvisioningError `protobuf:"bytes,29,rep,name=on_premises_provisioning_errors,json=onPremisesProvisioningErrors,proto3" json:"on_premises_provisioning_errors,omitempty"` - // For an external user invited to the tenant using the invitation API, this property represents the invited user's invitation status. - // For invited users, the state can be `PendingAcceptance` or `Accepted`, or "" / emptystring for all other users. - // Returned only on $select. Supports $filter with the supported values. For example: $filter=externalUserState eq 'PendingAcceptance'. - ExternalUserState string `protobuf:"bytes,40,opt,name=external_user_state,json=externalUserState,proto3" json:"external_user_state,omitempty"` - // Shows the timestamp for the latest change to the externalUserState property. Returned only on $select. - ExternalUserStateChangeDateTime *timestamppb.Timestamp `protobuf:"bytes,41,opt,name=external_user_state_change_date_time,json=externalUserStateChangeDateTime,proto3" json:"external_user_state_change_date_time,omitempty"` - // Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get - // an error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph). - // If this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint. - // Returned only on $select. Read-only. Use invalidateAllRefreshTokens to reset. - RefreshTokensValidFromDateTime *timestamppb.Timestamp `protobuf:"bytes,60,opt,name=refresh_tokens_valid_from_date_time,json=refreshTokensValidFromDateTime,proto3" json:"refresh_tokens_valid_from_date_time,omitempty"` - // Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get - // an error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph). - // If this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint. - // Read-only. Use revokeSignInSessions to reset. - SignInSessionsValidFromDateTime *timestamppb.Timestamp `protobuf:"bytes,61,opt,name=sign_in_sessions_valid_from_date_time,json=signInSessionsValidFromDateTime,proto3" json:"sign_in_sessions_valid_from_date_time,omitempty"` -} - -func (x *Account) Reset() { - *x = Account{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Account) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Account) ProtoMessage() {} - -func (x *Account) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Account.ProtoReflect.Descriptor instead. -func (*Account) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{8} -} - -func (x *Account) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Account) GetAccountEnabled() bool { - if x != nil { - return x.AccountEnabled - } - return false -} - -func (x *Account) GetIsResourceAccount() bool { - if x != nil { - return x.IsResourceAccount - } - return false -} - -func (x *Account) GetCreationType() string { - if x != nil { - return x.CreationType - } - return "" -} - -func (x *Account) GetIdentities() []*Identities { - if x != nil { - return x.Identities - } - return nil -} - -func (x *Account) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *Account) GetPreferredName() string { - if x != nil { - return x.PreferredName - } - return "" -} - -func (x *Account) GetUidNumber() int64 { - if x != nil { - return x.UidNumber - } - return 0 -} - -func (x *Account) GetGidNumber() int64 { - if x != nil { - return x.GidNumber - } - return 0 -} - -func (x *Account) GetMail() string { - if x != nil { - return x.Mail - } - return "" -} - -func (x *Account) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Account) GetPasswordProfile() *PasswordProfile { - if x != nil { - return x.PasswordProfile - } - return nil -} - -func (x *Account) GetMemberOf() []*Group { - if x != nil { - return x.MemberOf - } - return nil -} - -func (x *Account) GetCreatedDateTime() *timestamppb.Timestamp { - if x != nil { - return x.CreatedDateTime - } - return nil -} - -func (x *Account) GetDeletedDateTime() *timestamppb.Timestamp { - if x != nil { - return x.DeletedDateTime - } - return nil -} - -func (x *Account) GetOnPremisesSyncEnabled() bool { - if x != nil { - return x.OnPremisesSyncEnabled - } - return false -} - -func (x *Account) GetOnPremisesImmutableId() string { - if x != nil { - return x.OnPremisesImmutableId - } - return "" -} - -func (x *Account) GetOnPremisesSecurityIdentifier() string { - if x != nil { - return x.OnPremisesSecurityIdentifier - } - return "" -} - -func (x *Account) GetOnPremisesDistinguishedName() string { - if x != nil { - return x.OnPremisesDistinguishedName - } - return "" -} - -func (x *Account) GetOnPremisesSamAccountName() string { - if x != nil { - return x.OnPremisesSamAccountName - } - return "" -} - -func (x *Account) GetOnPremisesDomainName() string { - if x != nil { - return x.OnPremisesDomainName - } - return "" -} - -func (x *Account) GetOnPremisesUserPrincipalName() string { - if x != nil { - return x.OnPremisesUserPrincipalName - } - return "" -} - -func (x *Account) GetOnPremisesLastSyncDateTime() *timestamppb.Timestamp { - if x != nil { - return x.OnPremisesLastSyncDateTime - } - return nil -} - -func (x *Account) GetOnPremisesProvisioningErrors() []*OnPremisesProvisioningError { - if x != nil { - return x.OnPremisesProvisioningErrors - } - return nil -} - -func (x *Account) GetExternalUserState() string { - if x != nil { - return x.ExternalUserState - } - return "" -} - -func (x *Account) GetExternalUserStateChangeDateTime() *timestamppb.Timestamp { - if x != nil { - return x.ExternalUserStateChangeDateTime - } - return nil -} - -func (x *Account) GetRefreshTokensValidFromDateTime() *timestamppb.Timestamp { - if x != nil { - return x.RefreshTokensValidFromDateTime - } - return nil -} - -func (x *Account) GetSignInSessionsValidFromDateTime() *timestamppb.Timestamp { - if x != nil { - return x.SignInSessionsValidFromDateTime - } - return nil -} - -// Identities Represents an identity used to sign in to a user account. -// An identity can be provided by oCIS, by organizations, or by social identity providers such as Facebook, Google, or Microsoft, that are tied to a user account. -// This enables the user to sign in to the user account with any of those associated identities. -// They are also used to keep a history of old usernames. -type Identities struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Specifies the user sign-in types in your directory, such as `emailAddress`, `userName` or `federated`. - // Here, federated represents a unique identifier for a user from an issuer, that can be in any format chosen by the issuer. - // Additional validation is enforced on *issuer_assigned_id* when the sign-in type is set to `emailAddress` or `userName`. - // This property can also be set to any custom string. - SignInType string `protobuf:"bytes,1,opt,name=sign_in_type,json=signInType,proto3" json:"sign_in_type,omitempty"` - // Specifies the issuer of the identity, for example facebook.com. - // For local accounts (where signInType is not federated), this property is - // the local B2C tenant default domain name, for example contoso.onmicrosoft.com. - // For external users from other Azure AD organization, this will be the domain of - // the federated organization, for example contoso.com. - // Supports $filter. 512 character limit. - Issuer string `protobuf:"bytes,2,opt,name=issuer,proto3" json:"issuer,omitempty"` - // Specifies the unique identifier assigned to the user by the issuer. The combination of *issuer* and *issuerAssignedId* must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts). - // When *signInType* is set to: - // * `emailAddress`, (or starts with `emailAddress` like `emailAddress1`) *issuerAssignedId* must be a valid email address - // * `userName`, issuer_assigned_id must be a valid local part of an email address - // Supports $filter. 512 character limit. - IssuerAssignedId string `protobuf:"bytes,3,opt,name=issuer_assigned_id,json=issuerAssignedId,proto3" json:"issuer_assigned_id,omitempty"` -} - -func (x *Identities) Reset() { - *x = Identities{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Identities) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Identities) ProtoMessage() {} - -func (x *Identities) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Identities.ProtoReflect.Descriptor instead. -func (*Identities) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{9} -} - -func (x *Identities) GetSignInType() string { - if x != nil { - return x.SignInType - } - return "" -} - -func (x *Identities) GetIssuer() string { - if x != nil { - return x.Issuer - } - return "" -} - -func (x *Identities) GetIssuerAssignedId() string { - if x != nil { - return x.IssuerAssignedId - } - return "" -} - -type PasswordProfile struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The password for the user. This property is required when a user is created. - // It can be updated, but the user will be required to change the password on the next login. - // The password must satisfy minimum requirements as specified by the user’s passwordPolicies property. By default, a strong password is required. - Password string `protobuf:"bytes,1,opt,name=password,proto3" json:"password,omitempty"` - // The time when this account last changed their password. - LastPasswordChangeDateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=last_password_change_date_time,json=lastPasswordChangeDateTime,proto3" json:"last_password_change_date_time,omitempty"` - // Specifies password policies for the user. - //This value is an enumeration with one possible value being “DisableStrongPassword”, which allows weaker passwords than the default policy to be specified. - // “DisablePasswordExpiration” can also be specified. - PasswordPolicies []string `protobuf:"bytes,3,rep,name=password_policies,json=passwordPolicies,proto3" json:"password_policies,omitempty"` - // *true* if the user must change her password on the next login; otherwise false. - ForceChangePasswordNextSignIn bool `protobuf:"varint,4,opt,name=force_change_password_next_sign_in,json=forceChangePasswordNextSignIn,proto3" json:"force_change_password_next_sign_in,omitempty"` - // If *true*, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false. - ForceChangePasswordNextSignInWithMfa bool `protobuf:"varint,5,opt,name=force_change_password_next_sign_in_with_mfa,json=forceChangePasswordNextSignInWithMfa,proto3" json:"force_change_password_next_sign_in_with_mfa,omitempty"` -} - -func (x *PasswordProfile) Reset() { - *x = PasswordProfile{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[10] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *PasswordProfile) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*PasswordProfile) ProtoMessage() {} - -func (x *PasswordProfile) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[10] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use PasswordProfile.ProtoReflect.Descriptor instead. -func (*PasswordProfile) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{10} -} - -func (x *PasswordProfile) GetPassword() string { - if x != nil { - return x.Password - } - return "" -} - -func (x *PasswordProfile) GetLastPasswordChangeDateTime() *timestamppb.Timestamp { - if x != nil { - return x.LastPasswordChangeDateTime - } - return nil -} - -func (x *PasswordProfile) GetPasswordPolicies() []string { - if x != nil { - return x.PasswordPolicies - } - return nil -} - -func (x *PasswordProfile) GetForceChangePasswordNextSignIn() bool { - if x != nil { - return x.ForceChangePasswordNextSignIn - } - return false -} - -func (x *PasswordProfile) GetForceChangePasswordNextSignInWithMfa() bool { - if x != nil { - return x.ForceChangePasswordNextSignInWithMfa - } - return false -} - -type ListGroupsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Optional. The maximum number of groups to return in the response - PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Optional. A pagination token returned from a previous call to `Get` - // that indicates from where search should continue - PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - // Optional. Used to specify a subset of fields that should be - // returned by a get operation or modified by an update operation. - FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` - // Optional. Search criteria used to select the groups to return. - // If no search criteria is specified then all groups will be - // returned - // - // TODO update query language - // Query expressions can be used to restrict results based upon - // the account properties where the operators `=`, `NOT`, `AND` and `OR` - // can be used along with the suffix wildcard symbol `*`. - // - // The string properties in a query expression should use escaped quotes - // for values that include whitespace to prevent unexpected behavior. - // - // Some example queries are: - // - // * Query `display_name=Th*` returns accounts whose display_name - // starts with "Th" - // * Query `display_name=\\"Test String\\"` returns groups with - // display names that include both "Test" and "String" - Query string `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"` -} - -func (x *ListGroupsRequest) Reset() { - *x = ListGroupsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[11] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListGroupsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListGroupsRequest) ProtoMessage() {} - -func (x *ListGroupsRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[11] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListGroupsRequest.ProtoReflect.Descriptor instead. -func (*ListGroupsRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{11} -} - -func (x *ListGroupsRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListGroupsRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -func (x *ListGroupsRequest) GetFieldMask() *fieldmaskpb.FieldMask { - if x != nil { - return x.FieldMask - } - return nil -} - -func (x *ListGroupsRequest) GetQuery() string { - if x != nil { - return x.Query - } - return "" -} - -type ListGroupsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The field name should match the noun "group" in the method name. There - // will be a maximum number of items returned based on the page_size field - // in the request - Groups []*Group `protobuf:"bytes,1,rep,name=groups,proto3" json:"groups,omitempty"` - // Token to retrieve the next page of results, or empty if there are no - // more results in the list - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` -} - -func (x *ListGroupsResponse) Reset() { - *x = ListGroupsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[12] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListGroupsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListGroupsResponse) ProtoMessage() {} - -func (x *ListGroupsResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[12] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListGroupsResponse.ProtoReflect.Descriptor instead. -func (*ListGroupsResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{12} -} - -func (x *ListGroupsResponse) GetGroups() []*Group { - if x != nil { - return x.Groups - } - return nil -} - -func (x *ListGroupsResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -type GetGroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *GetGroupRequest) Reset() { - *x = GetGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[13] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *GetGroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*GetGroupRequest) ProtoMessage() {} - -func (x *GetGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[13] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use GetGroupRequest.ProtoReflect.Descriptor instead. -func (*GetGroupRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{13} -} - -func (x *GetGroupRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type CreateGroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The account resource to create - Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` -} - -func (x *CreateGroupRequest) Reset() { - *x = CreateGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[14] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *CreateGroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*CreateGroupRequest) ProtoMessage() {} - -func (x *CreateGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[14] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use CreateGroupRequest.ProtoReflect.Descriptor instead. -func (*CreateGroupRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{14} -} - -func (x *CreateGroupRequest) GetGroup() *Group { - if x != nil { - return x.Group - } - return nil -} - -type UpdateGroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The group resource which replaces the resource on the server - Group *Group `protobuf:"bytes,1,opt,name=group,proto3" json:"group,omitempty"` - // The update mask applies to the resource. For the `FieldMask` definition, - // see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - UpdateMask *fieldmaskpb.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask,proto3" json:"update_mask,omitempty"` -} - -func (x *UpdateGroupRequest) Reset() { - *x = UpdateGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[15] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *UpdateGroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*UpdateGroupRequest) ProtoMessage() {} - -func (x *UpdateGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[15] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use UpdateGroupRequest.ProtoReflect.Descriptor instead. -func (*UpdateGroupRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{15} -} - -func (x *UpdateGroupRequest) GetGroup() *Group { - if x != nil { - return x.Group - } - return nil -} - -func (x *UpdateGroupRequest) GetUpdateMask() *fieldmaskpb.FieldMask { - if x != nil { - return x.UpdateMask - } - return nil -} - -type DeleteGroupRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *DeleteGroupRequest) Reset() { - *x = DeleteGroupRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[16] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *DeleteGroupRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*DeleteGroupRequest) ProtoMessage() {} - -func (x *DeleteGroupRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[16] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use DeleteGroupRequest.ProtoReflect.Descriptor instead. -func (*DeleteGroupRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{16} -} - -func (x *DeleteGroupRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type AddMemberRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The id of the group to add a member to - GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // The account id to add - AccountId string `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` -} - -func (x *AddMemberRequest) Reset() { - *x = AddMemberRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[17] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *AddMemberRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*AddMemberRequest) ProtoMessage() {} - -func (x *AddMemberRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[17] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use AddMemberRequest.ProtoReflect.Descriptor instead. -func (*AddMemberRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{17} -} - -func (x *AddMemberRequest) GetGroupId() string { - if x != nil { - return x.GroupId - } - return "" -} - -func (x *AddMemberRequest) GetAccountId() string { - if x != nil { - return x.AccountId - } - return "" -} - -type RemoveMemberRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The id of the group to remove a member from - GroupId string `protobuf:"bytes,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"` - // The account id to remove - AccountId string `protobuf:"bytes,2,opt,name=account_id,json=accountId,proto3" json:"account_id,omitempty"` -} - -func (x *RemoveMemberRequest) Reset() { - *x = RemoveMemberRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[18] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *RemoveMemberRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*RemoveMemberRequest) ProtoMessage() {} - -func (x *RemoveMemberRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[18] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use RemoveMemberRequest.ProtoReflect.Descriptor instead. -func (*RemoveMemberRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{18} -} - -func (x *RemoveMemberRequest) GetGroupId() string { - if x != nil { - return x.GroupId - } - return "" -} - -func (x *RemoveMemberRequest) GetAccountId() string { - if x != nil { - return x.AccountId - } - return "" -} - -type ListMembersRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` - // Optional. A pagination token returned from a previous call to `Get` - // that indicates from where search should continue - PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"` - // Optional. Used to specify a subset of fields that should be - // returned by a get operation or modified by an update operation. - FieldMask *fieldmaskpb.FieldMask `protobuf:"bytes,3,opt,name=field_mask,json=fieldMask,proto3" json:"field_mask,omitempty"` - // Optional. Search criteria used to select the groups to return. - // If no search criteria is specified then all groups will be - // returned - // - // TODO update query language - // Query expressions can be used to restrict results based upon - // the account properties where the operators `=`, `NOT`, `AND` and `OR` - // can be used along with the suffix wildcard symbol `*`. - // - // The string properties in a query expression should use escaped quotes - // for values that include whitespace to prevent unexpected behavior. - // - // Some example queries are: - // - // * Query `display_name=Th*` returns accounts whose display_name - // starts with "Th" - // * Query `display_name=\\"Test String\\"` returns groups with - // display names that include both "Test" and "String" - Query string `protobuf:"bytes,4,opt,name=query,proto3" json:"query,omitempty"` - // The id of the group to list members from - Id string `protobuf:"bytes,5,opt,name=id,proto3" json:"id,omitempty"` -} - -func (x *ListMembersRequest) Reset() { - *x = ListMembersRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[19] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListMembersRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListMembersRequest) ProtoMessage() {} - -func (x *ListMembersRequest) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[19] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListMembersRequest.ProtoReflect.Descriptor instead. -func (*ListMembersRequest) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{19} -} - -func (x *ListMembersRequest) GetPageSize() int32 { - if x != nil { - return x.PageSize - } - return 0 -} - -func (x *ListMembersRequest) GetPageToken() string { - if x != nil { - return x.PageToken - } - return "" -} - -func (x *ListMembersRequest) GetFieldMask() *fieldmaskpb.FieldMask { - if x != nil { - return x.FieldMask - } - return nil -} - -func (x *ListMembersRequest) GetQuery() string { - if x != nil { - return x.Query - } - return "" -} - -func (x *ListMembersRequest) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -type ListMembersResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The field name should match the noun "members" in the method name. There - // will be a maximum number of items returned based on the page_size field - // in the request - Members []*Account `protobuf:"bytes,1,rep,name=members,proto3" json:"members,omitempty"` - // Token to retrieve the next page of results, or empty if there are no - // more results in the list - NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"` -} - -func (x *ListMembersResponse) Reset() { - *x = ListMembersResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[20] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *ListMembersResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*ListMembersResponse) ProtoMessage() {} - -func (x *ListMembersResponse) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[20] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use ListMembersResponse.ProtoReflect.Descriptor instead. -func (*ListMembersResponse) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{20} -} - -func (x *ListMembersResponse) GetMembers() []*Account { - if x != nil { - return x.Members - } - return nil -} - -func (x *ListMembersResponse) GetNextPageToken() string { - if x != nil { - return x.NextPageToken - } - return "" -} - -type Group struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // The unique identifier for the group. - // Returned by default. Inherited from directoryObject. Key. Not nullable. Read-only. - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - // The display name for the group. This property is required when a group is created and cannot be cleared during updates. - // Returned by default. Supports $filter and $orderby. - // groupofnames MUST cn - DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name,omitempty"` // groupofnames MUST/MAY member - // Users, contacts, and groups that are members of this group. HTTP Methods: GET (supported for all groups), POST (supported for security groups and mail-enabled security groups), DELETE (supported only for security groups) Read-only. Nullable. - // TODO accounts (users) only for now, we can add groups with the dedicated message using oneof construct later - Members []*Account `protobuf:"bytes,3,rep,name=members,proto3" json:"members,omitempty"` - // groupofnames MAY businessCategory - // groupofnames MAY o - // groupofnames MAY ou - // groupofnames MAY owner, SINGLE-VALUE but there might be multiple owners - Owners []*Account `protobuf:"bytes,4,rep,name=owners,proto3" json:"owners,omitempty"` - // An optional description for the group. Returned by default. - // groupofnames MAY description - Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"` - // used for exposing the user using ldap - // posixgroup MUST gidnumber - GidNumber int64 `protobuf:"varint,6,opt,name=gid_number,json=gidNumber,proto3" json:"gid_number,omitempty"` - // Timestamp of when the group was created. The value cannot be modified and is automatically populated when the group is created - // Returned by default. Read-only. - CreatedDateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=created_date_time,json=createdDateTime,proto3" json:"created_date_time,omitempty"` - // For some Azure Active Directory objects (user, group, application), if the object is deleted, it is first logically deleted, and this property is updated with the date and time when the object was deleted. Otherwise this property is null. If the object is restored, this property is updated to null. - // Returned by default. Read-only. - DeletedDateTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=deleted_date_time,json=deletedDateTime,proto3" json:"deleted_date_time,omitempty"` - // Timestamp of when the group is set to expire. The value cannot be modified and is automatically populated when the group is created. - // Returned by default. Read-only. - ExpirationDateTime *timestamppb.Timestamp `protobuf:"bytes,9,opt,name=expiration_date_time,json=expirationDateTime,proto3" json:"expiration_date_time,omitempty"` - // True if the group is not displayed in certain parts of the Outlook user interface: - // in the Address Book, in address lists for selecting message recipients, and in the Browse Groups dialog for searching groups; false otherwise. Default value is false. - // Returned only on $select. - HideFromAddressLists bool `protobuf:"varint,10,opt,name=hide_from_address_lists,json=hideFromAddressLists,proto3" json:"hide_from_address_lists,omitempty"` - // Specifies the visibility of an Office 365 group. Possible values are: Private, Public, or Hiddenmembership; blank values are treated as public. See group visibility options to learn more. - // Visibility can be set only when a group is created; it is not editable. - // Returned by default. - Visibility string `protobuf:"bytes,11,opt,name=visibility,proto3" json:"visibility,omitempty"` - // *true* if this group is synced from an on-premises directory; - // *false* if this group was originally synced from an on-premises directory but is no longer synced; - // null if this object has never been synced from an on-premises directory (default). - // Returned by default. Read-only. Supports $filter. - OnPremisesSyncEnabled bool `protobuf:"varint,20,opt,name=on_premises_sync_enabled,json=onPremisesSyncEnabled,proto3" json:"on_premises_sync_enabled,omitempty"` - // This property is used to associate an on-premises LDAP user to the oCIS account object. - // This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user’s userPrincipalName (UPN) property. - // Important: The $ and _ characters cannot be used when specifying this property. Supports $filter. - OnPremisesImmutableId string `protobuf:"bytes,21,opt,name=on_premises_immutable_id,json=onPremisesImmutableId,proto3" json:"on_premises_immutable_id,omitempty"` - // Contains the on-premises security identifier (SID) for the group that was synchronized from on-premises to the cloud. Returned by default. Read-only. - OnPremisesSecurityIdentifier string `protobuf:"bytes,22,opt,name=on_premises_security_identifier,json=onPremisesSecurityIdentifier,proto3" json:"on_premises_security_identifier,omitempty"` - // Contains the on-premises LDAP `distinguished name` or `DN`. - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. - OnPremisesDistinguishedName string `protobuf:"bytes,23,opt,name=on_premises_distinguished_name,json=onPremisesDistinguishedName,proto3" json:"on_premises_distinguished_name,omitempty"` - // Contains the on-premises `samAccountName` synchronized from the on-premises directory. - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Returned by default. Read-only. - OnPremisesSamAccountName string `protobuf:"bytes,24,opt,name=on_premises_sam_account_name,json=onPremisesSamAccountName,proto3" json:"on_premises_sam_account_name,omitempty"` - // Contains the on-premises domain FQDN, also called dnsDomainName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. - // Returned by default. Read-only. - OnPremisesDomainName string `protobuf:"bytes,25,opt,name=on_premises_domain_name,json=onPremisesDomainName,proto3" json:"on_premises_domain_name,omitempty"` - // Contains the on-premises netBios name synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. - // Returned by default. Read-only. - OnPremisesNetBiosName string `protobuf:"bytes,26,opt,name=on_premises_net_bios_name,json=onPremisesNetBiosName,proto3" json:"on_premises_net_bios_name,omitempty"` - // Indicates the last time at which the group was synced with the on-premises directory. - // Returned by default. Read-only. Supports $filter. - OnPremisesLastSyncDateTime string `protobuf:"bytes,27,opt,name=on_premises_last_sync_date_time,json=onPremisesLastSyncDateTime,proto3" json:"on_premises_last_sync_date_time,omitempty"` - // Errors when using synchronization during provisioning. - OnPremisesProvisioningErrors []*OnPremisesProvisioningError `protobuf:"bytes,28,rep,name=on_premises_provisioning_errors,json=onPremisesProvisioningErrors,proto3" json:"on_premises_provisioning_errors,omitempty"` -} - -func (x *Group) Reset() { - *x = Group{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[21] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Group) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Group) ProtoMessage() {} - -func (x *Group) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[21] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use Group.ProtoReflect.Descriptor instead. -func (*Group) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{21} -} - -func (x *Group) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *Group) GetDisplayName() string { - if x != nil { - return x.DisplayName - } - return "" -} - -func (x *Group) GetMembers() []*Account { - if x != nil { - return x.Members - } - return nil -} - -func (x *Group) GetOwners() []*Account { - if x != nil { - return x.Owners - } - return nil -} - -func (x *Group) GetDescription() string { - if x != nil { - return x.Description - } - return "" -} - -func (x *Group) GetGidNumber() int64 { - if x != nil { - return x.GidNumber - } - return 0 -} - -func (x *Group) GetCreatedDateTime() *timestamppb.Timestamp { - if x != nil { - return x.CreatedDateTime - } - return nil -} - -func (x *Group) GetDeletedDateTime() *timestamppb.Timestamp { - if x != nil { - return x.DeletedDateTime - } - return nil -} - -func (x *Group) GetExpirationDateTime() *timestamppb.Timestamp { - if x != nil { - return x.ExpirationDateTime - } - return nil -} - -func (x *Group) GetHideFromAddressLists() bool { - if x != nil { - return x.HideFromAddressLists - } - return false -} - -func (x *Group) GetVisibility() string { - if x != nil { - return x.Visibility - } - return "" -} - -func (x *Group) GetOnPremisesSyncEnabled() bool { - if x != nil { - return x.OnPremisesSyncEnabled - } - return false -} - -func (x *Group) GetOnPremisesImmutableId() string { - if x != nil { - return x.OnPremisesImmutableId - } - return "" -} - -func (x *Group) GetOnPremisesSecurityIdentifier() string { - if x != nil { - return x.OnPremisesSecurityIdentifier - } - return "" -} - -func (x *Group) GetOnPremisesDistinguishedName() string { - if x != nil { - return x.OnPremisesDistinguishedName - } - return "" -} - -func (x *Group) GetOnPremisesSamAccountName() string { - if x != nil { - return x.OnPremisesSamAccountName - } - return "" -} - -func (x *Group) GetOnPremisesDomainName() string { - if x != nil { - return x.OnPremisesDomainName - } - return "" -} - -func (x *Group) GetOnPremisesNetBiosName() string { - if x != nil { - return x.OnPremisesNetBiosName - } - return "" -} - -func (x *Group) GetOnPremisesLastSyncDateTime() string { - if x != nil { - return x.OnPremisesLastSyncDateTime - } - return "" -} - -func (x *Group) GetOnPremisesProvisioningErrors() []*OnPremisesProvisioningError { - if x != nil { - return x.OnPremisesProvisioningErrors - } - return nil -} - -type OnPremisesProvisioningError struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Category of the provisioning error. Note: Currently, there is only one possible value. Possible value: PropertyConflict - indicates a property value is not unique. Other objects contain the same value for the property. - Category string `protobuf:"bytes,1,opt,name=category,proto3" json:"category,omitempty"` - // The date and time at which the error occurred. - OccurredDateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=occurred_date_time,json=occurredDateTime,proto3" json:"occurred_date_time,omitempty"` - // Name of the directory property causing the error. Current possible values: UserPrincipalName or ProxyAddress - PropertyCausingError string `protobuf:"bytes,3,opt,name=property_causing_error,json=propertyCausingError,proto3" json:"property_causing_error,omitempty"` - // Value of the property causing the error. - Value string `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"` -} - -func (x *OnPremisesProvisioningError) Reset() { - *x = OnPremisesProvisioningError{} - if protoimpl.UnsafeEnabled { - mi := &file_proto_v0_accounts_proto_msgTypes[22] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *OnPremisesProvisioningError) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*OnPremisesProvisioningError) ProtoMessage() {} - -func (x *OnPremisesProvisioningError) ProtoReflect() protoreflect.Message { - mi := &file_proto_v0_accounts_proto_msgTypes[22] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use OnPremisesProvisioningError.ProtoReflect.Descriptor instead. -func (*OnPremisesProvisioningError) Descriptor() ([]byte, []int) { - return file_proto_v0_accounts_proto_rawDescGZIP(), []int{22} -} - -func (x *OnPremisesProvisioningError) GetCategory() string { - if x != nil { - return x.Category - } - return "" -} - -func (x *OnPremisesProvisioningError) GetOccurredDateTime() *timestamppb.Timestamp { - if x != nil { - return x.OccurredDateTime - } - return nil -} - -func (x *OnPremisesProvisioningError) GetPropertyCausingError() string { - if x != nil { - return x.PropertyCausingError - } - return "" -} - -func (x *OnPremisesProvisioningError) GetValue() string { - if x != nil { - return x.Value - } - return "" -} - -var File_proto_v0_accounts_proto protoreflect.FileDescriptor - -var file_proto_v0_accounts_proto_rawDesc = []byte{ - 0x0a, 0x17, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, - 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, - 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1c, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, - 0x67, 0x65, 0x6e, 0x2d, 0x6f, 0x70, 0x65, 0x6e, 0x61, 0x70, 0x69, 0x76, 0x32, 0x2f, 0x6f, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x15, 0x0a, 0x13, 0x52, 0x65, 0x62, 0x75, 0x69, - 0x6c, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x16, - 0x0a, 0x14, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb4, 0x01, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, - 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x05, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, - 0x65, 0x12, 0x23, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, - 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, - 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, - 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, - 0x6b, 0x12, 0x1a, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, 0x82, 0x01, - 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, - 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x52, 0x08, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, - 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, - 0x65, 0x6e, 0x22, 0x23, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x58, 0x0a, 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, - 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x40, 0x0a, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, - 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x22, 0x95, 0x01, 0x0a, 0x14, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x40, 0x0a, 0x07, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, - 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x3b, 0x0a, 0x0b, - 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, - 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x26, 0x0a, 0x14, 0x44, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x22, 0xdd, 0x0d, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x27, 0x0a, - 0x0f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x45, - 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x2e, 0x0a, 0x13, 0x69, 0x73, 0x5f, 0x72, 0x65, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x11, 0x69, 0x73, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x63, - 0x72, 0x65, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x69, - 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x29, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, - 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, - 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x52, 0x0a, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, - 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, - 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x70, 0x72, 0x65, - 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x0d, 0x70, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x69, 0x64, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x08, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x75, 0x69, 0x64, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, - 0x1d, 0x0a, 0x0a, 0x67, 0x69, 0x64, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x09, 0x20, - 0x01, 0x28, 0x03, 0x52, 0x09, 0x67, 0x69, 0x64, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x12, - 0x0a, 0x04, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x61, - 0x69, 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, - 0x6e, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, - 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x59, 0x0a, 0x10, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, - 0x5f, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, - 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x50, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x52, 0x0f, - 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, - 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4f, 0x66, 0x18, 0x0d, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, - 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x08, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x4f, - 0x66, 0x12, 0x46, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, - 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, - 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x64, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x11, 0x64, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x11, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x0f, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x12, 0x37, 0x0a, 0x18, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, - 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x14, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x15, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x53, - 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x18, 0x6f, 0x6e, - 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x69, 0x6d, 0x6d, 0x75, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6f, 0x6e, - 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x49, 0x6d, 0x6d, 0x75, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x1f, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, - 0x65, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1c, 0x6f, 0x6e, - 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x1e, 0x6f, 0x6e, - 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, - 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x17, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x1b, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x44, 0x69, - 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x3e, 0x0a, 0x1c, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x73, - 0x61, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, - 0x73, 0x53, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x35, 0x0a, 0x17, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x64, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x14, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x44, 0x6f, 0x6d, 0x61, - 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x44, 0x0a, 0x1f, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, - 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x70, 0x72, 0x69, 0x6e, 0x63, - 0x69, 0x70, 0x61, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x1b, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x55, 0x73, 0x65, 0x72, 0x50, - 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x5f, 0x0a, 0x1f, - 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x6c, 0x61, 0x73, 0x74, - 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x1c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x52, 0x1a, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x4c, 0x61, 0x73, - 0x74, 0x53, 0x79, 0x6e, 0x63, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x81, 0x01, - 0x0a, 0x1f, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x70, 0x72, - 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, - 0x73, 0x18, 0x1d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x3a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, - 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, - 0x65, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x72, - 0x72, 0x6f, 0x72, 0x52, 0x1c, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x50, - 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, - 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x28, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, - 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, - 0x65, 0x12, 0x69, 0x0a, 0x24, 0x65, 0x78, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x5f, 0x75, 0x73, - 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x29, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x1f, 0x65, 0x78, 0x74, - 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x55, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65, 0x43, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x67, 0x0a, 0x23, - 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x5f, 0x76, - 0x61, 0x6c, 0x69, 0x64, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x3c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, - 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x1e, 0x72, 0x65, 0x66, 0x72, 0x65, 0x73, 0x68, 0x54, 0x6f, - 0x6b, 0x65, 0x6e, 0x73, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x44, 0x61, 0x74, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x6a, 0x0a, 0x25, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x69, 0x6e, - 0x5f, 0x73, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x5f, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x5f, - 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x3d, - 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, - 0x52, 0x1f, 0x73, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x46, 0x72, 0x6f, 0x6d, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, - 0x65, 0x22, 0x74, 0x0a, 0x0a, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x12, - 0x20, 0x0a, 0x0c, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x69, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x54, 0x79, 0x70, - 0x65, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x06, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x12, 0x2c, 0x0a, 0x12, 0x69, 0x73, 0x73, - 0x75, 0x65, 0x72, 0x5f, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x5f, 0x69, 0x64, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x69, 0x73, 0x73, 0x75, 0x65, 0x72, 0x41, 0x73, 0x73, - 0x69, 0x67, 0x6e, 0x65, 0x64, 0x49, 0x64, 0x22, 0xe0, 0x02, 0x0a, 0x0f, 0x50, 0x61, 0x73, 0x73, - 0x77, 0x6f, 0x72, 0x64, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, - 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x12, 0x5e, 0x0a, 0x1e, 0x6c, 0x61, 0x73, 0x74, 0x5f, - 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x1a, 0x6c, 0x61, 0x73, - 0x74, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x44, - 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x70, 0x61, 0x73, 0x73, 0x77, - 0x6f, 0x72, 0x64, 0x5f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x09, 0x52, 0x10, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x50, 0x6f, 0x6c, 0x69, - 0x63, 0x69, 0x65, 0x73, 0x12, 0x49, 0x0a, 0x22, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, - 0x61, 0x6e, 0x67, 0x65, 0x5f, 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x6e, 0x65, - 0x78, 0x74, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x5f, 0x69, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, - 0x52, 0x1d, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x50, 0x61, 0x73, - 0x73, 0x77, 0x6f, 0x72, 0x64, 0x4e, 0x65, 0x78, 0x74, 0x53, 0x69, 0x67, 0x6e, 0x49, 0x6e, 0x12, - 0x59, 0x0a, 0x2b, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x5f, - 0x70, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x5f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x73, 0x69, - 0x67, 0x6e, 0x5f, 0x69, 0x6e, 0x5f, 0x77, 0x69, 0x74, 0x68, 0x5f, 0x6d, 0x66, 0x61, 0x18, 0x05, - 0x20, 0x01, 0x28, 0x08, 0x52, 0x24, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x43, 0x68, 0x61, 0x6e, 0x67, - 0x65, 0x50, 0x61, 0x73, 0x73, 0x77, 0x6f, 0x72, 0x64, 0x4e, 0x65, 0x78, 0x74, 0x53, 0x69, 0x67, - 0x6e, 0x49, 0x6e, 0x57, 0x69, 0x74, 0x68, 0x4d, 0x66, 0x61, 0x22, 0xb2, 0x01, 0x0a, 0x11, 0x4c, - 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x21, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x05, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, - 0x69, 0x7a, 0x65, 0x12, 0x23, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, - 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x09, 0x70, - 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, - 0x64, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, - 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, - 0x61, 0x73, 0x6b, 0x12, 0x1a, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x22, - 0x7a, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x06, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, - 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, - 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x21, 0x0a, 0x0f, 0x47, - 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x50, - 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x22, 0x8d, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x3a, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x05, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x6d, 0x61, - 0x73, 0x6b, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x73, 0x6b, - 0x22, 0x24, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4c, 0x0a, 0x10, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, 0x72, - 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x49, 0x64, 0x22, 0x4f, 0x0a, 0x13, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x67, - 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x12, 0x1d, 0x0a, 0x0a, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x49, 0x64, 0x22, 0xc3, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x21, 0x0a, 0x09, - 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x42, - 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, - 0x23, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x04, 0xe2, 0x41, 0x01, 0x01, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, - 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x39, 0x0a, 0x0a, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6d, 0x61, - 0x73, 0x6b, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, - 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x09, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x12, - 0x1a, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x42, 0x04, - 0xe2, 0x41, 0x01, 0x01, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x7f, 0x0a, 0x13, 0x4c, - 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x40, 0x0a, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x07, 0x6d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, - 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, - 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xaa, 0x09, 0x0a, - 0x05, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, - 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x69, - 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x07, 0x6d, 0x65, 0x6d, - 0x62, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, 0x6d, - 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x52, 0x07, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x3e, 0x0a, 0x06, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x63, 0x6f, - 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x06, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x20, 0x0a, 0x0b, 0x64, - 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a, - 0x0a, 0x67, 0x69, 0x64, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x06, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x09, 0x67, 0x69, 0x64, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x11, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, - 0x54, 0x69, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x11, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, - 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0f, 0x64, 0x65, 0x6c, - 0x65, 0x74, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x4c, 0x0a, 0x14, - 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x12, 0x65, 0x78, 0x70, 0x69, 0x72, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x35, 0x0a, 0x17, 0x68, 0x69, - 0x64, 0x65, 0x5f, 0x66, 0x72, 0x6f, 0x6d, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x5f, - 0x6c, 0x69, 0x73, 0x74, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x68, 0x69, 0x64, - 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x4c, 0x69, 0x73, 0x74, - 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, - 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, - 0x79, 0x12, 0x37, 0x0a, 0x18, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, - 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x14, 0x20, - 0x01, 0x28, 0x08, 0x52, 0x15, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x53, - 0x79, 0x6e, 0x63, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x12, 0x37, 0x0a, 0x18, 0x6f, 0x6e, - 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x69, 0x6d, 0x6d, 0x75, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x15, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6f, 0x6e, - 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x49, 0x6d, 0x6d, 0x75, 0x74, 0x61, 0x62, 0x6c, - 0x65, 0x49, 0x64, 0x12, 0x45, 0x0a, 0x1f, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, - 0x65, 0x73, 0x5f, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x5f, 0x69, 0x64, 0x65, 0x6e, - 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x18, 0x16, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1c, 0x6f, 0x6e, - 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x53, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, - 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x1e, 0x6f, 0x6e, - 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, - 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x17, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x1b, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x44, 0x69, - 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x3e, 0x0a, 0x1c, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x73, - 0x61, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, - 0x18, 0x20, 0x01, 0x28, 0x09, 0x52, 0x18, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, - 0x73, 0x53, 0x61, 0x6d, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, - 0x35, 0x0a, 0x17, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x64, - 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x19, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x14, 0x6f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x44, 0x6f, 0x6d, 0x61, - 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x38, 0x0a, 0x19, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, - 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x6e, 0x65, 0x74, 0x5f, 0x62, 0x69, 0x6f, 0x73, 0x5f, 0x6e, - 0x61, 0x6d, 0x65, 0x18, 0x1a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x15, 0x6f, 0x6e, 0x50, 0x72, 0x65, - 0x6d, 0x69, 0x73, 0x65, 0x73, 0x4e, 0x65, 0x74, 0x42, 0x69, 0x6f, 0x73, 0x4e, 0x61, 0x6d, 0x65, - 0x12, 0x43, 0x0a, 0x1f, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, - 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x73, 0x79, 0x6e, 0x63, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, - 0x69, 0x6d, 0x65, 0x18, 0x1b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x1a, 0x6f, 0x6e, 0x50, 0x72, 0x65, - 0x6d, 0x69, 0x73, 0x65, 0x73, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x79, 0x6e, 0x63, 0x44, 0x61, 0x74, - 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x81, 0x01, 0x0a, 0x1f, 0x6f, 0x6e, 0x5f, 0x70, 0x72, 0x65, - 0x6d, 0x69, 0x73, 0x65, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x69, - 0x6e, 0x67, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x18, 0x1c, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x3a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, - 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, - 0x4f, 0x6e, 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, - 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x1c, 0x6f, 0x6e, 0x50, - 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, - 0x69, 0x6e, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x22, 0xcf, 0x01, 0x0a, 0x1b, 0x4f, 0x6e, - 0x50, 0x72, 0x65, 0x6d, 0x69, 0x73, 0x65, 0x73, 0x50, 0x72, 0x6f, 0x76, 0x69, 0x73, 0x69, 0x6f, - 0x6e, 0x69, 0x6e, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x1a, 0x0a, 0x08, 0x63, 0x61, 0x74, - 0x65, 0x67, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x74, - 0x65, 0x67, 0x6f, 0x72, 0x79, 0x12, 0x48, 0x0a, 0x12, 0x6f, 0x63, 0x63, 0x75, 0x72, 0x72, 0x65, - 0x64, 0x5f, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x10, 0x6f, - 0x63, 0x63, 0x75, 0x72, 0x72, 0x65, 0x64, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, - 0x34, 0x0a, 0x16, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x5f, 0x63, 0x61, 0x75, 0x73, - 0x69, 0x6e, 0x67, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x14, 0x70, 0x72, 0x6f, 0x70, 0x65, 0x72, 0x74, 0x79, 0x43, 0x61, 0x75, 0x73, 0x69, 0x6e, 0x67, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x32, 0x8d, 0x06, 0x0a, 0x0f, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, - 0xa2, 0x01, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x12, 0x32, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, - 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, - 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, - 0x23, 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2d, 0x6c, 0x69, 0x73, - 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x90, 0x01, 0x0a, 0x0a, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x12, 0x30, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, - 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x28, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x22, 0x22, 0x1d, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x2d, 0x67, 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x99, 0x01, 0x0a, 0x0d, 0x43, 0x72, 0x65, 0x61, - 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, - 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, - 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, - 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x3a, 0x01, 0x2a, 0x12, 0x99, 0x01, 0x0a, 0x0d, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x26, 0x2e, 0x63, 0x6f, 0x6d, - 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x41, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x22, 0x2b, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, - 0x89, 0x01, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x33, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, - 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x30, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x2b, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x25, 0x22, 0x20, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, - 0x73, 0x2d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x32, 0xd2, 0x09, 0x0a, 0x0d, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x9a, 0x01, - 0x0a, 0x0a, 0x4c, 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x12, 0x30, 0x2e, 0x63, - 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, - 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, - 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, - 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, - 0x69, 0x73, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x27, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x21, 0x22, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, - 0x70, 0x73, 0x2d, 0x6c, 0x69, 0x73, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x88, 0x01, 0x0a, 0x08, 0x47, - 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x2e, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, - 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, - 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x26, 0x82, - 0xd3, 0xe4, 0x93, 0x02, 0x20, 0x22, 0x1b, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2d, 0x67, - 0x65, 0x74, 0x3a, 0x01, 0x2a, 0x12, 0x91, 0x01, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, - 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, - 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, - 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x29, - 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, - 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2d, - 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x91, 0x01, 0x0a, 0x0b, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, - 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, - 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, - 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, - 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, - 0x75, 0x70, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, - 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, - 0x75, 0x70, 0x73, 0x2d, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x83, 0x01, - 0x0a, 0x0b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x31, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, - 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x44, 0x65, - 0x6c, 0x65, 0x74, 0x65, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x29, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x23, - 0x22, 0x1e, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x73, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2d, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, - 0x3a, 0x01, 0x2a, 0x12, 0x97, 0x01, 0x0a, 0x09, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, - 0x72, 0x12, 0x2f, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, - 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, - 0x30, 0x2e, 0x41, 0x64, 0x64, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, - 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x33, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x2d, - 0x22, 0x28, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, - 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x3d, 0x2a, 0x7d, 0x2f, 0x6d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x24, 0x72, 0x65, 0x66, 0x3a, 0x01, 0x2a, 0x12, 0xaa, 0x01, - 0x0a, 0x0c, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x32, - 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, - 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, - 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, - 0x76, 0x30, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x40, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x3a, - 0x22, 0x35, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, - 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x5f, 0x69, 0x64, 0x3d, 0x2a, 0x7d, 0x2f, 0x6d, 0x65, - 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x7b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x69, - 0x64, 0x7d, 0x2f, 0x24, 0x72, 0x65, 0x66, 0x3a, 0x01, 0x2a, 0x12, 0xa3, 0x01, 0x0a, 0x0b, 0x4c, - 0x69, 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12, 0x31, 0x2e, 0x63, 0x6f, 0x6d, - 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, - 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, - 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, - 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x22, 0x2d, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x27, 0x22, 0x22, 0x2f, 0x61, 0x70, 0x69, 0x2f, - 0x76, 0x30, 0x2f, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x73, 0x2f, 0x7b, 0x69, 0x64, 0x3d, 0x2a, 0x7d, - 0x2f, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2f, 0x24, 0x72, 0x65, 0x66, 0x3a, 0x01, 0x2a, - 0x32, 0xaa, 0x01, 0x0a, 0x0c, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x99, 0x01, 0x0a, 0x0c, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x64, - 0x65, 0x78, 0x12, 0x32, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2e, - 0x76, 0x30, 0x2e, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x6f, 0x77, 0x6e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x6f, 0x63, 0x69, 0x73, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x2e, 0x76, 0x30, 0x2e, 0x52, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x49, 0x6e, - 0x64, 0x65, 0x78, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x20, 0x82, 0xd3, 0xe4, - 0x93, 0x02, 0x1a, 0x22, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x30, 0x2f, 0x69, 0x6e, 0x64, - 0x65, 0x78, 0x2f, 0x72, 0x65, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x3a, 0x01, 0x2a, 0x42, 0xda, 0x02, - 0x5a, 0x34, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, - 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, - 0x6e, 0x74, 0x73, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x76, 0x30, - 0x3b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x92, 0x41, 0xa0, 0x02, 0x12, 0xb6, 0x01, 0x0a, 0x20, 0x6f, - 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x49, 0x6e, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x65, - 0x20, 0x53, 0x63, 0x61, 0x6c, 0x65, 0x20, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, - 0x47, 0x0a, 0x0d, 0x6f, 0x77, 0x6e, 0x43, 0x6c, 0x6f, 0x75, 0x64, 0x20, 0x47, 0x6d, 0x62, 0x48, - 0x12, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, - 0x69, 0x73, 0x1a, 0x14, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x40, 0x6f, 0x77, 0x6e, 0x63, - 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x63, 0x6f, 0x6d, 0x2a, 0x42, 0x0a, 0x0a, 0x41, 0x70, 0x61, 0x63, - 0x68, 0x65, 0x2d, 0x32, 0x2e, 0x30, 0x12, 0x34, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, - 0x6f, 0x75, 0x64, 0x2f, 0x6f, 0x63, 0x69, 0x73, 0x2f, 0x62, 0x6c, 0x6f, 0x62, 0x2f, 0x6d, 0x61, - 0x73, 0x74, 0x65, 0x72, 0x2f, 0x4c, 0x49, 0x43, 0x45, 0x4e, 0x53, 0x45, 0x32, 0x05, 0x31, 0x2e, - 0x30, 0x2e, 0x30, 0x2a, 0x02, 0x01, 0x02, 0x32, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x3a, 0x10, 0x61, 0x70, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6a, 0x73, 0x6f, 0x6e, 0x72, 0x3d, 0x0a, 0x10, 0x44, - 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x20, 0x4d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x12, - 0x29, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x6f, 0x77, 0x6e, 0x63, 0x6c, 0x6f, 0x75, - 0x64, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, - 0x2f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x2f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, -} - -var ( - file_proto_v0_accounts_proto_rawDescOnce sync.Once - file_proto_v0_accounts_proto_rawDescData = file_proto_v0_accounts_proto_rawDesc -) - -func file_proto_v0_accounts_proto_rawDescGZIP() []byte { - file_proto_v0_accounts_proto_rawDescOnce.Do(func() { - file_proto_v0_accounts_proto_rawDescData = protoimpl.X.CompressGZIP(file_proto_v0_accounts_proto_rawDescData) - }) - return file_proto_v0_accounts_proto_rawDescData -} - -var file_proto_v0_accounts_proto_msgTypes = make([]protoimpl.MessageInfo, 23) -var file_proto_v0_accounts_proto_goTypes = []interface{}{ - (*RebuildIndexRequest)(nil), // 0: com.owncloud.ocis.accounts.v0.RebuildIndexRequest - (*RebuildIndexResponse)(nil), // 1: com.owncloud.ocis.accounts.v0.RebuildIndexResponse - (*ListAccountsRequest)(nil), // 2: com.owncloud.ocis.accounts.v0.ListAccountsRequest - (*ListAccountsResponse)(nil), // 3: com.owncloud.ocis.accounts.v0.ListAccountsResponse - (*GetAccountRequest)(nil), // 4: com.owncloud.ocis.accounts.v0.GetAccountRequest - (*CreateAccountRequest)(nil), // 5: com.owncloud.ocis.accounts.v0.CreateAccountRequest - (*UpdateAccountRequest)(nil), // 6: com.owncloud.ocis.accounts.v0.UpdateAccountRequest - (*DeleteAccountRequest)(nil), // 7: com.owncloud.ocis.accounts.v0.DeleteAccountRequest - (*Account)(nil), // 8: com.owncloud.ocis.accounts.v0.Account - (*Identities)(nil), // 9: com.owncloud.ocis.accounts.v0.Identities - (*PasswordProfile)(nil), // 10: com.owncloud.ocis.accounts.v0.PasswordProfile - (*ListGroupsRequest)(nil), // 11: com.owncloud.ocis.accounts.v0.ListGroupsRequest - (*ListGroupsResponse)(nil), // 12: com.owncloud.ocis.accounts.v0.ListGroupsResponse - (*GetGroupRequest)(nil), // 13: com.owncloud.ocis.accounts.v0.GetGroupRequest - (*CreateGroupRequest)(nil), // 14: com.owncloud.ocis.accounts.v0.CreateGroupRequest - (*UpdateGroupRequest)(nil), // 15: com.owncloud.ocis.accounts.v0.UpdateGroupRequest - (*DeleteGroupRequest)(nil), // 16: com.owncloud.ocis.accounts.v0.DeleteGroupRequest - (*AddMemberRequest)(nil), // 17: com.owncloud.ocis.accounts.v0.AddMemberRequest - (*RemoveMemberRequest)(nil), // 18: com.owncloud.ocis.accounts.v0.RemoveMemberRequest - (*ListMembersRequest)(nil), // 19: com.owncloud.ocis.accounts.v0.ListMembersRequest - (*ListMembersResponse)(nil), // 20: com.owncloud.ocis.accounts.v0.ListMembersResponse - (*Group)(nil), // 21: com.owncloud.ocis.accounts.v0.Group - (*OnPremisesProvisioningError)(nil), // 22: com.owncloud.ocis.accounts.v0.OnPremisesProvisioningError - (*fieldmaskpb.FieldMask)(nil), // 23: google.protobuf.FieldMask - (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 25: google.protobuf.Empty -} -var file_proto_v0_accounts_proto_depIdxs = []int32{ - 23, // 0: com.owncloud.ocis.accounts.v0.ListAccountsRequest.field_mask:type_name -> google.protobuf.FieldMask - 8, // 1: com.owncloud.ocis.accounts.v0.ListAccountsResponse.accounts:type_name -> com.owncloud.ocis.accounts.v0.Account - 8, // 2: com.owncloud.ocis.accounts.v0.CreateAccountRequest.account:type_name -> com.owncloud.ocis.accounts.v0.Account - 8, // 3: com.owncloud.ocis.accounts.v0.UpdateAccountRequest.account:type_name -> com.owncloud.ocis.accounts.v0.Account - 23, // 4: com.owncloud.ocis.accounts.v0.UpdateAccountRequest.update_mask:type_name -> google.protobuf.FieldMask - 9, // 5: com.owncloud.ocis.accounts.v0.Account.identities:type_name -> com.owncloud.ocis.accounts.v0.Identities - 10, // 6: com.owncloud.ocis.accounts.v0.Account.password_profile:type_name -> com.owncloud.ocis.accounts.v0.PasswordProfile - 21, // 7: com.owncloud.ocis.accounts.v0.Account.memberOf:type_name -> com.owncloud.ocis.accounts.v0.Group - 24, // 8: com.owncloud.ocis.accounts.v0.Account.created_date_time:type_name -> google.protobuf.Timestamp - 24, // 9: com.owncloud.ocis.accounts.v0.Account.deleted_date_time:type_name -> google.protobuf.Timestamp - 24, // 10: com.owncloud.ocis.accounts.v0.Account.on_premises_last_sync_date_time:type_name -> google.protobuf.Timestamp - 22, // 11: com.owncloud.ocis.accounts.v0.Account.on_premises_provisioning_errors:type_name -> com.owncloud.ocis.accounts.v0.OnPremisesProvisioningError - 24, // 12: com.owncloud.ocis.accounts.v0.Account.external_user_state_change_date_time:type_name -> google.protobuf.Timestamp - 24, // 13: com.owncloud.ocis.accounts.v0.Account.refresh_tokens_valid_from_date_time:type_name -> google.protobuf.Timestamp - 24, // 14: com.owncloud.ocis.accounts.v0.Account.sign_in_sessions_valid_from_date_time:type_name -> google.protobuf.Timestamp - 24, // 15: com.owncloud.ocis.accounts.v0.PasswordProfile.last_password_change_date_time:type_name -> google.protobuf.Timestamp - 23, // 16: com.owncloud.ocis.accounts.v0.ListGroupsRequest.field_mask:type_name -> google.protobuf.FieldMask - 21, // 17: com.owncloud.ocis.accounts.v0.ListGroupsResponse.groups:type_name -> com.owncloud.ocis.accounts.v0.Group - 21, // 18: com.owncloud.ocis.accounts.v0.CreateGroupRequest.group:type_name -> com.owncloud.ocis.accounts.v0.Group - 21, // 19: com.owncloud.ocis.accounts.v0.UpdateGroupRequest.group:type_name -> com.owncloud.ocis.accounts.v0.Group - 23, // 20: com.owncloud.ocis.accounts.v0.UpdateGroupRequest.update_mask:type_name -> google.protobuf.FieldMask - 23, // 21: com.owncloud.ocis.accounts.v0.ListMembersRequest.field_mask:type_name -> google.protobuf.FieldMask - 8, // 22: com.owncloud.ocis.accounts.v0.ListMembersResponse.members:type_name -> com.owncloud.ocis.accounts.v0.Account - 8, // 23: com.owncloud.ocis.accounts.v0.Group.members:type_name -> com.owncloud.ocis.accounts.v0.Account - 8, // 24: com.owncloud.ocis.accounts.v0.Group.owners:type_name -> com.owncloud.ocis.accounts.v0.Account - 24, // 25: com.owncloud.ocis.accounts.v0.Group.created_date_time:type_name -> google.protobuf.Timestamp - 24, // 26: com.owncloud.ocis.accounts.v0.Group.deleted_date_time:type_name -> google.protobuf.Timestamp - 24, // 27: com.owncloud.ocis.accounts.v0.Group.expiration_date_time:type_name -> google.protobuf.Timestamp - 22, // 28: com.owncloud.ocis.accounts.v0.Group.on_premises_provisioning_errors:type_name -> com.owncloud.ocis.accounts.v0.OnPremisesProvisioningError - 24, // 29: com.owncloud.ocis.accounts.v0.OnPremisesProvisioningError.occurred_date_time:type_name -> google.protobuf.Timestamp - 2, // 30: com.owncloud.ocis.accounts.v0.AccountsService.ListAccounts:input_type -> com.owncloud.ocis.accounts.v0.ListAccountsRequest - 4, // 31: com.owncloud.ocis.accounts.v0.AccountsService.GetAccount:input_type -> com.owncloud.ocis.accounts.v0.GetAccountRequest - 5, // 32: com.owncloud.ocis.accounts.v0.AccountsService.CreateAccount:input_type -> com.owncloud.ocis.accounts.v0.CreateAccountRequest - 6, // 33: com.owncloud.ocis.accounts.v0.AccountsService.UpdateAccount:input_type -> com.owncloud.ocis.accounts.v0.UpdateAccountRequest - 7, // 34: com.owncloud.ocis.accounts.v0.AccountsService.DeleteAccount:input_type -> com.owncloud.ocis.accounts.v0.DeleteAccountRequest - 11, // 35: com.owncloud.ocis.accounts.v0.GroupsService.ListGroups:input_type -> com.owncloud.ocis.accounts.v0.ListGroupsRequest - 13, // 36: com.owncloud.ocis.accounts.v0.GroupsService.GetGroup:input_type -> com.owncloud.ocis.accounts.v0.GetGroupRequest - 14, // 37: com.owncloud.ocis.accounts.v0.GroupsService.CreateGroup:input_type -> com.owncloud.ocis.accounts.v0.CreateGroupRequest - 15, // 38: com.owncloud.ocis.accounts.v0.GroupsService.UpdateGroup:input_type -> com.owncloud.ocis.accounts.v0.UpdateGroupRequest - 16, // 39: com.owncloud.ocis.accounts.v0.GroupsService.DeleteGroup:input_type -> com.owncloud.ocis.accounts.v0.DeleteGroupRequest - 17, // 40: com.owncloud.ocis.accounts.v0.GroupsService.AddMember:input_type -> com.owncloud.ocis.accounts.v0.AddMemberRequest - 18, // 41: com.owncloud.ocis.accounts.v0.GroupsService.RemoveMember:input_type -> com.owncloud.ocis.accounts.v0.RemoveMemberRequest - 19, // 42: com.owncloud.ocis.accounts.v0.GroupsService.ListMembers:input_type -> com.owncloud.ocis.accounts.v0.ListMembersRequest - 0, // 43: com.owncloud.ocis.accounts.v0.IndexService.RebuildIndex:input_type -> com.owncloud.ocis.accounts.v0.RebuildIndexRequest - 3, // 44: com.owncloud.ocis.accounts.v0.AccountsService.ListAccounts:output_type -> com.owncloud.ocis.accounts.v0.ListAccountsResponse - 8, // 45: com.owncloud.ocis.accounts.v0.AccountsService.GetAccount:output_type -> com.owncloud.ocis.accounts.v0.Account - 8, // 46: com.owncloud.ocis.accounts.v0.AccountsService.CreateAccount:output_type -> com.owncloud.ocis.accounts.v0.Account - 8, // 47: com.owncloud.ocis.accounts.v0.AccountsService.UpdateAccount:output_type -> com.owncloud.ocis.accounts.v0.Account - 25, // 48: com.owncloud.ocis.accounts.v0.AccountsService.DeleteAccount:output_type -> google.protobuf.Empty - 12, // 49: com.owncloud.ocis.accounts.v0.GroupsService.ListGroups:output_type -> com.owncloud.ocis.accounts.v0.ListGroupsResponse - 21, // 50: com.owncloud.ocis.accounts.v0.GroupsService.GetGroup:output_type -> com.owncloud.ocis.accounts.v0.Group - 21, // 51: com.owncloud.ocis.accounts.v0.GroupsService.CreateGroup:output_type -> com.owncloud.ocis.accounts.v0.Group - 21, // 52: com.owncloud.ocis.accounts.v0.GroupsService.UpdateGroup:output_type -> com.owncloud.ocis.accounts.v0.Group - 25, // 53: com.owncloud.ocis.accounts.v0.GroupsService.DeleteGroup:output_type -> google.protobuf.Empty - 21, // 54: com.owncloud.ocis.accounts.v0.GroupsService.AddMember:output_type -> com.owncloud.ocis.accounts.v0.Group - 21, // 55: com.owncloud.ocis.accounts.v0.GroupsService.RemoveMember:output_type -> com.owncloud.ocis.accounts.v0.Group - 20, // 56: com.owncloud.ocis.accounts.v0.GroupsService.ListMembers:output_type -> com.owncloud.ocis.accounts.v0.ListMembersResponse - 1, // 57: com.owncloud.ocis.accounts.v0.IndexService.RebuildIndex:output_type -> com.owncloud.ocis.accounts.v0.RebuildIndexResponse - 44, // [44:58] is the sub-list for method output_type - 30, // [30:44] is the sub-list for method input_type - 30, // [30:30] is the sub-list for extension type_name - 30, // [30:30] is the sub-list for extension extendee - 0, // [0:30] is the sub-list for field type_name -} - -func init() { file_proto_v0_accounts_proto_init() } -func file_proto_v0_accounts_proto_init() { - if File_proto_v0_accounts_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_proto_v0_accounts_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RebuildIndexRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RebuildIndexResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAccountsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListAccountsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteAccountRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Account); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Identities); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PasswordProfile); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListGroupsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListGroupsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*DeleteGroupRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddMemberRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RemoveMemberRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMembersRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListMembersResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Group); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_proto_v0_accounts_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*OnPremisesProvisioningError); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_proto_v0_accounts_proto_rawDesc, - NumEnums: 0, - NumMessages: 23, - NumExtensions: 0, - NumServices: 3, - }, - GoTypes: file_proto_v0_accounts_proto_goTypes, - DependencyIndexes: file_proto_v0_accounts_proto_depIdxs, - MessageInfos: file_proto_v0_accounts_proto_msgTypes, - }.Build() - File_proto_v0_accounts_proto = out.File - file_proto_v0_accounts_proto_rawDesc = nil - file_proto_v0_accounts_proto_goTypes = nil - file_proto_v0_accounts_proto_depIdxs = nil -} diff --git a/accounts/pkg/proto/v0/accounts.pb.micro.go b/accounts/pkg/proto/v0/accounts.pb.micro.go deleted file mode 100644 index 63893df6d..000000000 --- a/accounts/pkg/proto/v0/accounts.pb.micro.go +++ /dev/null @@ -1,622 +0,0 @@ -// Code generated by protoc-gen-micro. DO NOT EDIT. -// source: proto/v0/accounts.proto - -package proto - -import ( - fmt "fmt" - _ "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options" - _ "google.golang.org/genproto/googleapis/api/annotations" - proto "google.golang.org/protobuf/proto" - emptypb "google.golang.org/protobuf/types/known/emptypb" - _ "google.golang.org/protobuf/types/known/fieldmaskpb" - _ "google.golang.org/protobuf/types/known/timestamppb" - math "math" -) - -import ( - context "context" - api "go-micro.dev/v4/api" - client "go-micro.dev/v4/client" - server "go-micro.dev/v4/server" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// Reference imports to suppress errors if they are not otherwise used. -var _ api.Endpoint -var _ context.Context -var _ client.Option -var _ server.Option - -// Api Endpoints for AccountsService service - -func NewAccountsServiceEndpoints() []*api.Endpoint { - return []*api.Endpoint{ - { - Name: "AccountsService.ListAccounts", - Path: []string{"/api/v0/accounts/accounts-list"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "AccountsService.GetAccount", - Path: []string{"/api/v0/accounts/accounts-get"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "AccountsService.CreateAccount", - Path: []string{"/api/v0/accounts/accounts-create"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "AccountsService.UpdateAccount", - Path: []string{"/api/v0/accounts/accounts-update"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "AccountsService.DeleteAccount", - Path: []string{"/api/v0/accounts/accounts-delete"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - } -} - -// Client API for AccountsService service - -type AccountsService interface { - // Lists accounts - ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...client.CallOption) (*ListAccountsResponse, error) - // Gets an account - GetAccount(ctx context.Context, in *GetAccountRequest, opts ...client.CallOption) (*Account, error) - // Creates an account - CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...client.CallOption) (*Account, error) - // Updates an account - UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...client.CallOption) (*Account, error) - // Deletes an account - DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...client.CallOption) (*emptypb.Empty, error) -} - -type accountsService struct { - c client.Client - name string -} - -func NewAccountsService(name string, c client.Client) AccountsService { - return &accountsService{ - c: c, - name: name, - } -} - -func (c *accountsService) ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...client.CallOption) (*ListAccountsResponse, error) { - req := c.c.NewRequest(c.name, "AccountsService.ListAccounts", in) - out := new(ListAccountsResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsService) GetAccount(ctx context.Context, in *GetAccountRequest, opts ...client.CallOption) (*Account, error) { - req := c.c.NewRequest(c.name, "AccountsService.GetAccount", in) - out := new(Account) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsService) CreateAccount(ctx context.Context, in *CreateAccountRequest, opts ...client.CallOption) (*Account, error) { - req := c.c.NewRequest(c.name, "AccountsService.CreateAccount", in) - out := new(Account) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsService) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, opts ...client.CallOption) (*Account, error) { - req := c.c.NewRequest(c.name, "AccountsService.UpdateAccount", in) - out := new(Account) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *accountsService) DeleteAccount(ctx context.Context, in *DeleteAccountRequest, opts ...client.CallOption) (*emptypb.Empty, error) { - req := c.c.NewRequest(c.name, "AccountsService.DeleteAccount", in) - out := new(emptypb.Empty) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for AccountsService service - -type AccountsServiceHandler interface { - // Lists accounts - ListAccounts(context.Context, *ListAccountsRequest, *ListAccountsResponse) error - // Gets an account - GetAccount(context.Context, *GetAccountRequest, *Account) error - // Creates an account - CreateAccount(context.Context, *CreateAccountRequest, *Account) error - // Updates an account - UpdateAccount(context.Context, *UpdateAccountRequest, *Account) error - // Deletes an account - DeleteAccount(context.Context, *DeleteAccountRequest, *emptypb.Empty) error -} - -func RegisterAccountsServiceHandler(s server.Server, hdlr AccountsServiceHandler, opts ...server.HandlerOption) error { - type accountsService interface { - ListAccounts(ctx context.Context, in *ListAccountsRequest, out *ListAccountsResponse) error - GetAccount(ctx context.Context, in *GetAccountRequest, out *Account) error - CreateAccount(ctx context.Context, in *CreateAccountRequest, out *Account) error - UpdateAccount(ctx context.Context, in *UpdateAccountRequest, out *Account) error - DeleteAccount(ctx context.Context, in *DeleteAccountRequest, out *emptypb.Empty) error - } - type AccountsService struct { - accountsService - } - h := &accountsServiceHandler{hdlr} - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "AccountsService.ListAccounts", - Path: []string{"/api/v0/accounts/accounts-list"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "AccountsService.GetAccount", - Path: []string{"/api/v0/accounts/accounts-get"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "AccountsService.CreateAccount", - Path: []string{"/api/v0/accounts/accounts-create"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "AccountsService.UpdateAccount", - Path: []string{"/api/v0/accounts/accounts-update"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "AccountsService.DeleteAccount", - Path: []string{"/api/v0/accounts/accounts-delete"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - return s.Handle(s.NewHandler(&AccountsService{h}, opts...)) -} - -type accountsServiceHandler struct { - AccountsServiceHandler -} - -func (h *accountsServiceHandler) ListAccounts(ctx context.Context, in *ListAccountsRequest, out *ListAccountsResponse) error { - return h.AccountsServiceHandler.ListAccounts(ctx, in, out) -} - -func (h *accountsServiceHandler) GetAccount(ctx context.Context, in *GetAccountRequest, out *Account) error { - return h.AccountsServiceHandler.GetAccount(ctx, in, out) -} - -func (h *accountsServiceHandler) CreateAccount(ctx context.Context, in *CreateAccountRequest, out *Account) error { - return h.AccountsServiceHandler.CreateAccount(ctx, in, out) -} - -func (h *accountsServiceHandler) UpdateAccount(ctx context.Context, in *UpdateAccountRequest, out *Account) error { - return h.AccountsServiceHandler.UpdateAccount(ctx, in, out) -} - -func (h *accountsServiceHandler) DeleteAccount(ctx context.Context, in *DeleteAccountRequest, out *emptypb.Empty) error { - return h.AccountsServiceHandler.DeleteAccount(ctx, in, out) -} - -// Api Endpoints for GroupsService service - -func NewGroupsServiceEndpoints() []*api.Endpoint { - return []*api.Endpoint{ - { - Name: "GroupsService.ListGroups", - Path: []string{"/api/v0/accounts/groups-list"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "GroupsService.GetGroup", - Path: []string{"/api/v0/accounts/groups-get"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "GroupsService.CreateGroup", - Path: []string{"/api/v0/accounts/groups-create"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "GroupsService.UpdateGroup", - Path: []string{"/api/v0/accounts/groups-update"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "GroupsService.DeleteGroup", - Path: []string{"/api/v0/accounts/groups-delete"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "GroupsService.AddMember", - Path: []string{"/api/v0/groups/{group_id=*}/members/$ref"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "GroupsService.RemoveMember", - Path: []string{"/api/v0/groups/{group_id=*}/members/{account_id}/$ref"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - { - Name: "GroupsService.ListMembers", - Path: []string{"/api/v0/groups/{id=*}/members/$ref"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - } -} - -// Client API for GroupsService service - -type GroupsService interface { - // Lists groups - ListGroups(ctx context.Context, in *ListGroupsRequest, opts ...client.CallOption) (*ListGroupsResponse, error) - // Gets an groups - GetGroup(ctx context.Context, in *GetGroupRequest, opts ...client.CallOption) (*Group, error) - // Creates a group - CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...client.CallOption) (*Group, error) - // Updates a group - UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...client.CallOption) (*Group, error) - // Deletes a group - DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...client.CallOption) (*emptypb.Empty, error) - // group:addmember https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0&tabs=http - AddMember(ctx context.Context, in *AddMemberRequest, opts ...client.CallOption) (*Group, error) - // group:removemember https://docs.microsoft.com/en-us/graph/api/group-delete-members?view=graph-rest-1.0 - RemoveMember(ctx context.Context, in *RemoveMemberRequest, opts ...client.CallOption) (*Group, error) - // group:listmembers https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0 - ListMembers(ctx context.Context, in *ListMembersRequest, opts ...client.CallOption) (*ListMembersResponse, error) -} - -type groupsService struct { - c client.Client - name string -} - -func NewGroupsService(name string, c client.Client) GroupsService { - return &groupsService{ - c: c, - name: name, - } -} - -func (c *groupsService) ListGroups(ctx context.Context, in *ListGroupsRequest, opts ...client.CallOption) (*ListGroupsResponse, error) { - req := c.c.NewRequest(c.name, "GroupsService.ListGroups", in) - out := new(ListGroupsResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupsService) GetGroup(ctx context.Context, in *GetGroupRequest, opts ...client.CallOption) (*Group, error) { - req := c.c.NewRequest(c.name, "GroupsService.GetGroup", in) - out := new(Group) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupsService) CreateGroup(ctx context.Context, in *CreateGroupRequest, opts ...client.CallOption) (*Group, error) { - req := c.c.NewRequest(c.name, "GroupsService.CreateGroup", in) - out := new(Group) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupsService) UpdateGroup(ctx context.Context, in *UpdateGroupRequest, opts ...client.CallOption) (*Group, error) { - req := c.c.NewRequest(c.name, "GroupsService.UpdateGroup", in) - out := new(Group) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupsService) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, opts ...client.CallOption) (*emptypb.Empty, error) { - req := c.c.NewRequest(c.name, "GroupsService.DeleteGroup", in) - out := new(emptypb.Empty) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupsService) AddMember(ctx context.Context, in *AddMemberRequest, opts ...client.CallOption) (*Group, error) { - req := c.c.NewRequest(c.name, "GroupsService.AddMember", in) - out := new(Group) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupsService) RemoveMember(ctx context.Context, in *RemoveMemberRequest, opts ...client.CallOption) (*Group, error) { - req := c.c.NewRequest(c.name, "GroupsService.RemoveMember", in) - out := new(Group) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *groupsService) ListMembers(ctx context.Context, in *ListMembersRequest, opts ...client.CallOption) (*ListMembersResponse, error) { - req := c.c.NewRequest(c.name, "GroupsService.ListMembers", in) - out := new(ListMembersResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for GroupsService service - -type GroupsServiceHandler interface { - // Lists groups - ListGroups(context.Context, *ListGroupsRequest, *ListGroupsResponse) error - // Gets an groups - GetGroup(context.Context, *GetGroupRequest, *Group) error - // Creates a group - CreateGroup(context.Context, *CreateGroupRequest, *Group) error - // Updates a group - UpdateGroup(context.Context, *UpdateGroupRequest, *Group) error - // Deletes a group - DeleteGroup(context.Context, *DeleteGroupRequest, *emptypb.Empty) error - // group:addmember https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0&tabs=http - AddMember(context.Context, *AddMemberRequest, *Group) error - // group:removemember https://docs.microsoft.com/en-us/graph/api/group-delete-members?view=graph-rest-1.0 - RemoveMember(context.Context, *RemoveMemberRequest, *Group) error - // group:listmembers https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0 - ListMembers(context.Context, *ListMembersRequest, *ListMembersResponse) error -} - -func RegisterGroupsServiceHandler(s server.Server, hdlr GroupsServiceHandler, opts ...server.HandlerOption) error { - type groupsService interface { - ListGroups(ctx context.Context, in *ListGroupsRequest, out *ListGroupsResponse) error - GetGroup(ctx context.Context, in *GetGroupRequest, out *Group) error - CreateGroup(ctx context.Context, in *CreateGroupRequest, out *Group) error - UpdateGroup(ctx context.Context, in *UpdateGroupRequest, out *Group) error - DeleteGroup(ctx context.Context, in *DeleteGroupRequest, out *emptypb.Empty) error - AddMember(ctx context.Context, in *AddMemberRequest, out *Group) error - RemoveMember(ctx context.Context, in *RemoveMemberRequest, out *Group) error - ListMembers(ctx context.Context, in *ListMembersRequest, out *ListMembersResponse) error - } - type GroupsService struct { - groupsService - } - h := &groupsServiceHandler{hdlr} - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "GroupsService.ListGroups", - Path: []string{"/api/v0/accounts/groups-list"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "GroupsService.GetGroup", - Path: []string{"/api/v0/accounts/groups-get"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "GroupsService.CreateGroup", - Path: []string{"/api/v0/accounts/groups-create"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "GroupsService.UpdateGroup", - Path: []string{"/api/v0/accounts/groups-update"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "GroupsService.DeleteGroup", - Path: []string{"/api/v0/accounts/groups-delete"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "GroupsService.AddMember", - Path: []string{"/api/v0/groups/{group_id=*}/members/$ref"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "GroupsService.RemoveMember", - Path: []string{"/api/v0/groups/{group_id=*}/members/{account_id}/$ref"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "GroupsService.ListMembers", - Path: []string{"/api/v0/groups/{id=*}/members/$ref"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - return s.Handle(s.NewHandler(&GroupsService{h}, opts...)) -} - -type groupsServiceHandler struct { - GroupsServiceHandler -} - -func (h *groupsServiceHandler) ListGroups(ctx context.Context, in *ListGroupsRequest, out *ListGroupsResponse) error { - return h.GroupsServiceHandler.ListGroups(ctx, in, out) -} - -func (h *groupsServiceHandler) GetGroup(ctx context.Context, in *GetGroupRequest, out *Group) error { - return h.GroupsServiceHandler.GetGroup(ctx, in, out) -} - -func (h *groupsServiceHandler) CreateGroup(ctx context.Context, in *CreateGroupRequest, out *Group) error { - return h.GroupsServiceHandler.CreateGroup(ctx, in, out) -} - -func (h *groupsServiceHandler) UpdateGroup(ctx context.Context, in *UpdateGroupRequest, out *Group) error { - return h.GroupsServiceHandler.UpdateGroup(ctx, in, out) -} - -func (h *groupsServiceHandler) DeleteGroup(ctx context.Context, in *DeleteGroupRequest, out *emptypb.Empty) error { - return h.GroupsServiceHandler.DeleteGroup(ctx, in, out) -} - -func (h *groupsServiceHandler) AddMember(ctx context.Context, in *AddMemberRequest, out *Group) error { - return h.GroupsServiceHandler.AddMember(ctx, in, out) -} - -func (h *groupsServiceHandler) RemoveMember(ctx context.Context, in *RemoveMemberRequest, out *Group) error { - return h.GroupsServiceHandler.RemoveMember(ctx, in, out) -} - -func (h *groupsServiceHandler) ListMembers(ctx context.Context, in *ListMembersRequest, out *ListMembersResponse) error { - return h.GroupsServiceHandler.ListMembers(ctx, in, out) -} - -// Api Endpoints for IndexService service - -func NewIndexServiceEndpoints() []*api.Endpoint { - return []*api.Endpoint{ - { - Name: "IndexService.RebuildIndex", - Path: []string{"/api/v0/index/rebuild"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - }, - } -} - -// Client API for IndexService service - -type IndexService interface { - RebuildIndex(ctx context.Context, in *RebuildIndexRequest, opts ...client.CallOption) (*RebuildIndexResponse, error) -} - -type indexService struct { - c client.Client - name string -} - -func NewIndexService(name string, c client.Client) IndexService { - return &indexService{ - c: c, - name: name, - } -} - -func (c *indexService) RebuildIndex(ctx context.Context, in *RebuildIndexRequest, opts ...client.CallOption) (*RebuildIndexResponse, error) { - req := c.c.NewRequest(c.name, "IndexService.RebuildIndex", in) - out := new(RebuildIndexResponse) - err := c.c.Call(ctx, req, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// Server API for IndexService service - -type IndexServiceHandler interface { - RebuildIndex(context.Context, *RebuildIndexRequest, *RebuildIndexResponse) error -} - -func RegisterIndexServiceHandler(s server.Server, hdlr IndexServiceHandler, opts ...server.HandlerOption) error { - type indexService interface { - RebuildIndex(ctx context.Context, in *RebuildIndexRequest, out *RebuildIndexResponse) error - } - type IndexService struct { - indexService - } - h := &indexServiceHandler{hdlr} - opts = append(opts, api.WithEndpoint(&api.Endpoint{ - Name: "IndexService.RebuildIndex", - Path: []string{"/api/v0/index/rebuild"}, - Method: []string{"POST"}, - Body: "*", - Handler: "rpc", - })) - return s.Handle(s.NewHandler(&IndexService{h}, opts...)) -} - -type indexServiceHandler struct { - IndexServiceHandler -} - -func (h *indexServiceHandler) RebuildIndex(ctx context.Context, in *RebuildIndexRequest, out *RebuildIndexResponse) error { - return h.IndexServiceHandler.RebuildIndex(ctx, in, out) -} diff --git a/accounts/pkg/proto/v0/accounts.pb.micro_test.go b/accounts/pkg/proto/v0/accounts.pb.micro_test.go deleted file mode 100644 index 003746f4f..000000000 --- a/accounts/pkg/proto/v0/accounts.pb.micro_test.go +++ /dev/null @@ -1,1317 +0,0 @@ -package proto_test - -import ( - "context" - "errors" - "fmt" - "io/ioutil" - "log" - "os" - "path/filepath" - "testing" - - mgrpcc "github.com/asim/go-micro/plugins/client/grpc/v4" - empty "github.com/golang/protobuf/ptypes/empty" - "github.com/owncloud/ocis/accounts/pkg/config" - "github.com/owncloud/ocis/accounts/pkg/logging" - "github.com/owncloud/ocis/accounts/pkg/proto/v0" - svc "github.com/owncloud/ocis/accounts/pkg/service/v0" - "github.com/owncloud/ocis/ocis-pkg/service/grpc" - settings "github.com/owncloud/ocis/settings/pkg/proto/v0" - "github.com/stretchr/testify/assert" - "go-micro.dev/v4/client" - merrors "go-micro.dev/v4/errors" - "google.golang.org/genproto/protobuf/field_mask" - "google.golang.org/protobuf/types/known/timestamppb" -) - -var service = grpc.NewService() - -var dataPath = createTmpDir() - -var newCreatedAccounts = []string{} -var newCreatedGroups = []string{} - -var mockedRoleAssignment = map[string]string{} - -var ( - user1 = proto.Account{ - Id: "f9149a32-2b8e-4f04-9e8d-937d81712b9a", - AccountEnabled: true, - IsResourceAccount: true, - CreationType: "", - DisplayName: "User One", - PreferredName: "user1", - OnPremisesSamAccountName: "user1", - UidNumber: 20009, - GidNumber: 30000, - Mail: "user1@example.com", - Identities: []*proto.Identities{nil}, - PasswordProfile: &proto.PasswordProfile{Password: "heysdjfsdlk"}, - MemberOf: []*proto.Group{ - {Id: "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa"}, // users - }, - } - user2 = proto.Account{ - Id: "e9149a32-2b8e-4f04-9e8d-937d81712b9a", - AccountEnabled: true, - IsResourceAccount: true, - CreationType: "", - DisplayName: "User Two", - PreferredName: "user2", - OnPremisesSamAccountName: "user2", - UidNumber: 20010, - GidNumber: 30000, - Mail: "user2@example.com", - Identities: []*proto.Identities{nil}, - PasswordProfile: &proto.PasswordProfile{Password: "hello123"}, - MemberOf: []*proto.Group{ - {Id: "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa"}, // users - }, - } -) - -func init() { - service = grpc.NewService( - grpc.Namespace("com.owncloud.api"), - grpc.Name("accounts"), - grpc.Address("localhost:9180"), - ) - - cfg := config.DefaultConfig() - cfg.Repo.Backend = "disk" - cfg.Repo.Disk.Path = dataPath - cfg.DemoUsersAndGroups = true - cfg.Log = &config.Log{} - var hdlr *svc.Service - var err error - - hdlr, err = svc.New( - svc.Logger(logging.Configure(cfg.Service.Name, cfg.Log)), - svc.Config(cfg), - svc.RoleService(buildRoleServiceMock()), - ) - - if err != nil { - log.Fatalf("Could not create new service") - } - - err = proto.RegisterAccountsServiceHandler(service.Server(), hdlr) - if err != nil { - log.Fatal("could not register the Accounts handler") - } - err = proto.RegisterGroupsServiceHandler(service.Server(), hdlr) - if err != nil { - log.Fatal("could not register the Groups handler") - } - - err = service.Server().Start() - if err != nil { - log.Fatal(err) - } -} - -func getAccount(user string) *proto.Account { - switch user { - case "user1": - return &user1 - case "user2": - return &user2 - default: - return &proto.Account{ - Id: fmt.Sprintf("new-id-%s", user), - AccountEnabled: true, - IsResourceAccount: true, - CreationType: "", - DisplayName: "Regular User", - PreferredName: user, - UidNumber: 2, - Mail: fmt.Sprintf("%s@example.com", user), - Identities: []*proto.Identities{nil}, - } - } -} - -func getGroup(group string) *proto.Group { - switch group { - case "sysusers": - return &proto.Group{Id: "34f38767-c937-4eb6-b847-1c175829a2a0", GidNumber: 15000, OnPremisesSamAccountName: "sysusers", DisplayName: "Technical users", Description: "A group for technical users. They should not show up in sharing dialogs.", Members: []*proto.Account{ - {Id: "820ba2a1-3f54-4538-80a4-2d73007e30bf"}, // idp - {Id: "bc596f3c-c955-4328-80a0-60d018b4ad57"}, // reva - }} - case "users": - return &proto.Group{Id: "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa", GidNumber: 30000, OnPremisesSamAccountName: "users", DisplayName: "Users", Description: "A group every normal user belongs to.", Members: []*proto.Account{ - {Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein - {Id: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"}, // marie - {Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman - }} - case "sailing-lovers": - return &proto.Group{Id: "6040aa17-9c64-4fef-9bd0-77234d71bad0", GidNumber: 30001, OnPremisesSamAccountName: "sailing-lovers", DisplayName: "Sailing lovers", Members: []*proto.Account{ - {Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein - }} - case "violin-haters": - return &proto.Group{Id: "dd58e5ec-842e-498b-8800-61f2ec6f911f", GidNumber: 30002, OnPremisesSamAccountName: "violin-haters", DisplayName: "Violin haters", Members: []*proto.Account{ - {Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein - }} - case "radium-lovers": - return &proto.Group{Id: "7b87fd49-286e-4a5f-bafd-c535d5dd997a", GidNumber: 30003, OnPremisesSamAccountName: "radium-lovers", DisplayName: "Radium lovers", Members: []*proto.Account{ - {Id: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"}, // marie - }} - case "polonium-lovers": - return &proto.Group{Id: "cedc21aa-4072-4614-8676-fa9165f598ff", GidNumber: 30004, OnPremisesSamAccountName: "polonium-lovers", DisplayName: "Polonium lovers", Members: []*proto.Account{ - {Id: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"}, // marie - }} - case "quantum-lovers": - return &proto.Group{Id: "a1726108-01f8-4c30-88df-2b1a9d1cba1a", GidNumber: 30005, OnPremisesSamAccountName: "quantum-lovers", DisplayName: "Quantum lovers", Members: []*proto.Account{ - {Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman - }} - case "philosophy-haters": - return &proto.Group{Id: "167cbee2-0518-455a-bfb2-031fe0621e5d", GidNumber: 30006, OnPremisesSamAccountName: "philosophy-haters", DisplayName: "Philosophy haters", Members: []*proto.Account{ - {Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman - }} - case "physics-lovers": - return &proto.Group{Id: "262982c1-2362-4afa-bfdf-8cbfef64a06e", GidNumber: 30007, OnPremisesSamAccountName: "physics-lovers", DisplayName: "Physics lovers", Members: []*proto.Account{ - {Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein - {Id: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"}, // marie - {Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman - }} - } - return nil -} - -func getTestGroups(group string) *proto.Group { - switch group { - case "grp1": - return &proto.Group{Id: "0779f828-4df8-41d6-82dd-40020d9fd0ef", GidNumber: 40000, OnPremisesSamAccountName: "grp1", DisplayName: "Group One", Description: "One group", Members: []*proto.Account{ - {Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein - {Id: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"}, // marie - }} - case "grp2": - return &proto.Group{Id: "f446fb0a-5e57-4812-9f47-9c1ebca99b5a", GidNumber: 40001, OnPremisesSamAccountName: "grp2", DisplayName: "Group Two", Description: "Two Group", Members: []*proto.Account{ - {Id: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"}, // marie - {Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman - }} - case "grp3": - return &proto.Group{Id: "cae8b5d5-d133-4d95-8595-fe33a5051017", GidNumber: 40002, OnPremisesSamAccountName: "grp3", DisplayName: "Group Three", Description: "Three Group", Members: []*proto.Account{ - {Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein - {Id: "f7fbf8c8-139b-4376-b307-cf0a8c2d0d9c"}, // marie - {Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman - }} - } - return nil -} - -func buildRoleServiceMock() settings.RoleService { - return settings.MockRoleService{ - AssignRoleToUserFunc: func(ctx context.Context, req *settings.AssignRoleToUserRequest, opts ...client.CallOption) (res *settings.AssignRoleToUserResponse, err error) { - mockedRoleAssignment[req.AccountUuid] = req.RoleId - return &settings.AssignRoleToUserResponse{ - Assignment: &settings.UserRoleAssignment{ - AccountUuid: req.AccountUuid, - RoleId: req.RoleId, - }, - }, nil - }, - } -} - -func cleanUp(t *testing.T) { - datastore := filepath.Join(dataPath, "accounts") - - for _, id := range newCreatedAccounts { - path := filepath.Join(datastore, id) - if _, err := os.Stat(path); os.IsNotExist(err) { - continue - } - _, _ = deleteAccount(t, id) - } - - datastore = filepath.Join(dataPath, "groups") - - for _, id := range newCreatedGroups { - path := filepath.Join(datastore, id) - if _, err := os.Stat(path); os.IsNotExist(err) { - continue - } - _, _ = deleteGroup(t, id) - } - - newCreatedAccounts = []string{} - newCreatedGroups = []string{} -} - -func assertUserExists(t *testing.T, account *proto.Account) { - resp, _ := listAccounts(t) - assertResponseContainsUser(t, resp, account) -} - -func assertResponseContainsUser(t *testing.T, response *proto.ListAccountsResponse, account *proto.Account) { - var result *proto.Account - for _, a := range response.Accounts { - if a.Id == account.Id { - result = account - } - } - if result == nil { - t.Fatalf("Account not found in response: %s", account.PreferredName) - } - assertAccountsSame(t, account, result) -} - -func assertResponseNotContainsUser(t *testing.T, response *proto.ListAccountsResponse, account *proto.Account) { - for _, a := range response.Accounts { - if a.Id == account.Id || a.PreferredName == account.PreferredName { - t.Fatal("Account was not expected to be present in the response, but was found.") - } - } -} - -func assertAccountsSame(t *testing.T, acc1, acc2 *proto.Account) { - assert.Equal(t, acc1.Id, acc2.Id) - assert.Equal(t, acc1.AccountEnabled, acc2.AccountEnabled) - assert.Equal(t, acc1.IsResourceAccount, acc2.IsResourceAccount) - assert.Equal(t, acc1.CreationType, acc2.CreationType) - assert.Equal(t, acc1.DisplayName, acc2.DisplayName) - assert.Equal(t, acc1.PreferredName, acc2.PreferredName) - assert.Equal(t, acc1.UidNumber, acc2.UidNumber) - assert.Equal(t, acc1.OnPremisesSamAccountName, acc2.OnPremisesSamAccountName) - assert.Equal(t, acc1.GidNumber, acc2.GidNumber) - assert.Equal(t, acc1.Mail, acc2.Mail) -} - -func assertResponseContainsGroup(t *testing.T, response *proto.ListGroupsResponse, group *proto.Group) { - var result *proto.Group - for _, g := range response.Groups { - if g.Id == group.Id { - result = g - } - } - if result == nil { - t.Fatalf("Group not found in response: %s", group.GetDisplayName()) - } - assertGroupsSame(t, group, result) -} - -func assertResponseNotContainsGroup(t *testing.T, response *proto.ListGroupsResponse, group *proto.Group) { - for _, g := range response.Groups { - if g.Id == group.Id && g.DisplayName == group.DisplayName { - t.Fatal("Group was not expected to be present in the response, but was found.") - } - } -} - -func assertGroupsSame(t *testing.T, grp1, grp2 *proto.Group) { - assert.Equal(t, grp1.Id, grp2.Id) - assert.Equal(t, grp1.GidNumber, grp2.GidNumber) - assert.Equal(t, grp1.OnPremisesSamAccountName, grp2.OnPremisesSamAccountName) - assert.Equal(t, grp1.DisplayName, grp2.DisplayName) - - assert.Equal(t, len(grp1.Members), len(grp2.Members)) - for _, m := range grp1.Members { - assertGroupHasMember(t, grp2, m.Id) - } -} - -func assertGroupHasMember(t *testing.T, grp *proto.Group, memberID string) { - for _, m := range grp.Members { - if m.Id == memberID { - return - } - } - - t.Fatalf("Member with id %s expected to be in group '%s', but not found", memberID, grp.DisplayName) -} - -func createAccount(t *testing.T, user string) (*proto.Account, error) { - client := mgrpcc.NewClient() - cl := proto.NewAccountsService("com.owncloud.api.accounts", client) - - account := getAccount(user) - request := &proto.CreateAccountRequest{Account: account} - res, err := cl.CreateAccount(context.Background(), request) - if err == nil { - newCreatedAccounts = append(newCreatedAccounts, account.Id) - } - return res, err -} - -func createGroup(t *testing.T, group *proto.Group) (*proto.Group, error) { - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - request := &proto.CreateGroupRequest{Group: group} - res, err := cl.CreateGroup(context.Background(), request) - if err == nil { - newCreatedGroups = append(newCreatedGroups, group.Id) - } - return res, err -} - -func updateAccount(t *testing.T, account *proto.Account, updateArray []string) (*proto.Account, error) { - client := mgrpcc.NewClient() - cl := proto.NewAccountsService("com.owncloud.api.accounts", client) - - updateMask := &field_mask.FieldMask{ - Paths: updateArray, - } - request := &proto.UpdateAccountRequest{Account: account, UpdateMask: updateMask} - res, err := cl.UpdateAccount(context.Background(), request) - - return res, err -} - -func listAccounts(t *testing.T) (*proto.ListAccountsResponse, error) { - request := &proto.ListAccountsRequest{} - client := mgrpcc.NewClient() - cl := proto.NewAccountsService("com.owncloud.api.accounts", client) - - response, err := cl.ListAccounts(context.Background(), request) - return response, err -} - -func listGroups(t *testing.T) *proto.ListGroupsResponse { - request := &proto.ListGroupsRequest{} - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - response, err := cl.ListGroups(context.Background(), request) - assert.NoError(t, err) - return response -} - -func deleteAccount(t *testing.T, id string) (*empty.Empty, error) { - client := mgrpcc.NewClient() - cl := proto.NewAccountsService("com.owncloud.api.accounts", client) - - req := &proto.DeleteAccountRequest{Id: id} - res, err := cl.DeleteAccount(context.Background(), req) - return res, err -} - -func deleteGroup(t *testing.T, id string) (*empty.Empty, error) { - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - req := &proto.DeleteGroupRequest{Id: id} - res, err := cl.DeleteGroup(context.Background(), req) - return res, err -} - -// createTmpDir creates a temporary dir for tests data. -func createTmpDir() string { - name, err := ioutil.TempDir("/tmp", "ocis-accounts-store-") - if err != nil { - panic(err) - } - - return name -} - -// https://github.com/owncloud/ocis/accounts/issues/61 -func TestCreateAccount(t *testing.T) { - resp, err := createAccount(t, "user1") - assert.NoError(t, err) - assertUserExists(t, getAccount("user1")) - assert.IsType(t, &proto.Account{}, resp) - // Account is not returned in response - // assertAccountsSame(t, getAccount("user1"), resp) - - resp, err = createAccount(t, "user2") - assert.NoError(t, err) - assertUserExists(t, getAccount("user2")) - assert.IsType(t, &proto.Account{}, resp) - // Account is not returned in response - // assertAccountsSame(t, getAccount("user2"), resp) - - cleanUp(t) -} - -// https://github.com/owncloud/ocis-accounts/issues/62 -func TestCreateExistingUser(t *testing.T) { - var err error - _, err = createAccount(t, "user1") - assert.NoError(t, err) - - _, err = createAccount(t, "user1") - assert.Error(t, err) - assertUserExists(t, getAccount("user1")) - - cleanUp(t) -} - -// All tests fail after running this -// https://github.com/owncloud/ocis/accounts-issues/62 -func TestCreateAccountInvalidUserName(t *testing.T) { - - resp, err := listAccounts(t) - assert.NoError(t, err) - numAccounts := len(resp.GetAccounts()) - - testData := []string{ - "", - "0", - "#&@#", - ".._$%203", - } - - for _, userName := range testData { - _, err := createAccount(t, userName) - - // Should give error - if err == nil { - t.Fatalf("Expected an Error when creating user '%s' but got nil", userName) - } - } - - // resp should have the same number of accounts - resp, err = listAccounts(t) - assert.NoError(t, err) - - assert.Equal(t, numAccounts, len(resp.GetAccounts())) - - cleanUp(t) -} - -func TestUpdateAccount(t *testing.T) { - tests := []struct { - name string - userAccount *proto.Account - expectedErrOnUpdate error - }{ - { - "Update user (demonstration of updatable fields)", - &proto.Account{ - DisplayName: "Alice Hansen", - PreferredName: "Wonderful-Alice", - OnPremisesSamAccountName: "Alice", - UidNumber: 20010, - GidNumber: 30001, - Mail: "alice@example.com", - }, - nil, - }, - { - "Update user with unicode data", - &proto.Account{ - DisplayName: "एलिस हेन्सेन", - PreferredName: "अद्भुत-एलिस", - OnPremisesSamAccountName: "एलिस", - UidNumber: 20010, - GidNumber: 30001, - Mail: "एलिस@उदाहरण.com", - }, - merrors.BadRequest("com.owncloud.api.accounts", "preferred_name 'अद्भुत-एलिस' must be at least the local part of an email"), - }, - { - "Update user with empty data values", - &proto.Account{ - DisplayName: "", - PreferredName: "", - OnPremisesSamAccountName: "", - UidNumber: 0, - GidNumber: 0, - Mail: "", - }, - merrors.BadRequest("com.owncloud.api.accounts", "preferred_name '' must be at least the local part of an email"), - }, - { - "Update user with strange data", - &proto.Account{ - DisplayName: "12345", - PreferredName: "a12345", - OnPremisesSamAccountName: "a54321", - UidNumber: 1000, - GidNumber: 1000, - Mail: "1.2@3.c_@", - }, - merrors.BadRequest("com.owncloud.api.accounts", "mail '1.2@3.c_@' must be a valid email"), - }, - } - - for _, tt := range tests { - // updatable fields for type Account - updateMask := []string{ - "AccountEnabled", - "IsResourceAccount", - "DisplayName", - "PreferredName", - "OnPremisesSamAccountName", - "UidNumber", - "GidNumber", - "Mail", - } - - t.Run(tt.name, func(t *testing.T) { - acc, err := createAccount(t, "user1") - assert.NoError(t, err) - - tt.userAccount.Id = acc.Id - tt.userAccount.AccountEnabled = false - tt.userAccount.IsResourceAccount = false - resp, err := updateAccount(t, tt.userAccount, updateMask) - if tt.expectedErrOnUpdate != nil { - assert.Error(t, err) - assert.Equal(t, tt.expectedErrOnUpdate.Error(), err.Error()) - } else { - assert.NoError(t, err) - assert.IsType(t, &proto.Account{}, resp) - assertAccountsSame(t, tt.userAccount, resp) - assertUserExists(t, tt.userAccount) - } - cleanUp(t) - }) - } -} - -func TestUpdateNonUpdatableFieldsInAccount(t *testing.T) { - _, err := createAccount(t, "user1") - assert.NoError(t, err) - - tests := []struct { - name string - updateMask []string - userAccount *proto.Account - }{ - { - "Try to update creation type", - []string{ - "CreationType", - }, - &proto.Account{ - Id: user1.Id, - CreationType: "Type Test", - }, - }, - { - "Try to update password profile", - []string{ - "PasswordProfile", - }, - &proto.Account{ - Id: user1.Id, - PasswordProfile: &proto.PasswordProfile{Password: "new password"}, - }, - }, - { - "Try to update member of", - []string{ - "MemberOf", - }, - &proto.Account{ - Id: user1.Id, - MemberOf: []*proto.Group{ - {Id: "509a9dcd-bb37-4f4f-a01a-19dca27d9cfa"}, - }, - }, - }, - } - for _, tt := range tests { - t.Run(tt.name, func(t *testing.T) { - res, err := updateAccount(t, tt.userAccount, tt.updateMask) - if err == nil { - t.Fatalf("Expected error while updating non updatable field, but found none.") - } - assert.IsType(t, &proto.Account{}, res) - assert.Empty(t, res) - assert.Error(t, err) - - var e *merrors.Error - - if errors.As(err, &e) { - assert.EqualValues(t, 400, e.Code) - assert.Equal(t, "Bad Request", e.Status) - - errMsg := fmt.Sprintf("can not update field %s, either unknown or readonly", tt.updateMask[0]) - assert.Equal(t, errMsg, e.Detail) - } else { - t.Fatal("Expected merrors errors but found something else.") - } - }) - } - - cleanUp(t) -} - -func TestListAccounts(t *testing.T) { - _, err := createAccount(t, "user1") - assert.NoError(t, err) - _, err = createAccount(t, "user2") - assert.NoError(t, err) - - resp, err := listAccounts(t) - assert.NoError(t, err) - - assert.IsType(t, &proto.ListAccountsResponse{}, resp) - assert.Equal(t, 9, len(resp.Accounts)) - - assertResponseContainsUser(t, resp, getAccount("user1")) - assertResponseContainsUser(t, resp, getAccount("user2")) - - cleanUp(t) -} - -func TestListWithoutUserCreation(t *testing.T) { - resp, err := listAccounts(t) - assert.NoError(t, err) - - // Only 7 default users - assert.Equal(t, 7, len(resp.Accounts)) - cleanUp(t) -} - -func TestListAccountsWithFilterQuery(t *testing.T) { - scenarios := []struct { - name string - query string - expectedIDs []string - }{ - // FIXME: disabled test scenarios need to be supported when implementing OData support - // OData implementation tracked in https://github.com/owncloud/ocis/issues/716 - //{ - // name: "ListAccounts with exact match on preferred_name", - // query: "preferred_name eq 'user1'", - // expectedIDs: []string{user1.Id}, - //}, - { - name: "ListAccounts with exact match on on_premises_sam_account_name", - query: "on_premises_sam_account_name eq 'user1'", - expectedIDs: []string{user1.Id}, - }, - { - name: "ListAccounts with exact match on mail", - query: "mail eq 'user1@example.com'", - expectedIDs: []string{user1.Id}, - }, - //{ - // name: "ListAccounts with exact match on id", - // query: "id eq 'f9149a32-2b8e-4f04-9e8d-937d81712b9a'", - // expectedIDs: []string{user1.Id}, - //}, - //{ - // name: "ListAccounts without match on preferred_name", - // query: "preferred_name eq 'wololo'", - // expectedIDs: []string{}, - //}, - //{ - // name: "ListAccounts with exact match on preferred_name AND mail", - // query: "preferred_name eq 'user1' and mail eq 'user1@example.com'", - // expectedIDs: []string{user1.Id}, - //}, - //{ - // name: "ListAccounts without match on preferred_name AND mail", - // query: "preferred_name eq 'user1' and mail eq 'wololo@example.com'", - // expectedIDs: []string{}, - //}, - //{ - // name: "ListAccounts with exact match on preferred_name OR mail, preferred_name exists, mail exists", - // query: "preferred_name eq 'user1' or mail eq 'user1@example.com'", - // expectedIDs: []string{user1.Id}, - //}, - //{ - // name: "ListAccounts with exact match on preferred_name OR mail, preferred_name exists, mail does not exist", - // query: "preferred_name eq 'user1' or mail eq 'wololo@example.com'", - // expectedIDs: []string{user1.Id}, - //}, - //{ - // name: "ListAccounts with exact match on preferred_name OR mail, preferred_name does not exists, mail exists", - // query: "preferred_name eq 'wololo' or mail eq 'user1@example.com'", - // expectedIDs: []string{user1.Id}, - //}, - //{ - // name: "ListAccounts without match on preferred_name OR mail, preferred_name and mail do not exist", - // query: "preferred_name eq 'wololo' or mail eq 'wololo@example.com'", - // expectedIDs: []string{}, - //}, - //{ - // name: "ListAccounts with multiple matches on preferred_name", - // query: "startswith(preferred_name,'user*')", - // expectedIDs: []string{user1.Id, user2.Id}, - //}, - //{ - // name: "ListAccounts with multiple matches on on_premises_sam_account_name", - // query: "startswith(on_premises_sam_account_name,'user*')", - // expectedIDs: []string{user1.Id, user2.Id}, - //}, - } - - cl := proto.NewAccountsService("com.owncloud.api.accounts", service.Client()) - - for _, scenario := range scenarios { - t.Run(scenario.name, func(t *testing.T) { - _, err := createAccount(t, "user1") - assert.NoError(t, err) - _, err = createAccount(t, "user2") - assert.NoError(t, err) - - req := &proto.ListAccountsRequest{Query: scenario.query} - res, err := cl.ListAccounts(context.Background(), req) - assert.NoError(t, err) - ids := make([]string, 0) - for _, acc := range res.Accounts { - ids = append(ids, acc.Id) - } - assert.Equal(t, scenario.expectedIDs, ids) - cleanUp(t) - }) - } -} - -func TestGetAccount(t *testing.T) { - _, err := createAccount(t, "user1") - assert.NoError(t, err) - - req := &proto.GetAccountRequest{Id: getAccount("user1").Id} - - cl := proto.NewAccountsService("com.owncloud.api.accounts", service.Client()) - - resp, err := cl.GetAccount(context.Background(), req) - - assert.NoError(t, err) - assert.IsType(t, &proto.Account{}, resp) - assertAccountsSame(t, getAccount("user1"), resp) - - cleanUp(t) -} - -//TODO: This segfaults! WIP - -func TestDeleteAccount(t *testing.T) { - _, err := createAccount(t, "user1") - assert.NoError(t, err) - _, err = createAccount(t, "user2") - assert.NoError(t, err) - - req := &proto.DeleteAccountRequest{Id: getAccount("user1").Id} - - client := mgrpcc.NewClient() - cl := proto.NewAccountsService("com.owncloud.api.accounts", client) - - resp, err := cl.DeleteAccount(context.Background(), req) - assert.NoError(t, err) - assert.IsType(t, resp, &empty.Empty{}) - - // Check the account doesn't exists anymore - accountList, _ := listAccounts(t) - assertResponseContainsUser(t, accountList, getAccount("user2")) - assertResponseNotContainsUser(t, accountList, getAccount("user1")) - - cleanUp(t) -} - -func TestListGroups(t *testing.T) { - req := &proto.ListGroupsRequest{} - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - resp, err := cl.ListGroups(context.Background(), req) - assert.NoError(t, err) - assert.IsType(t, &proto.ListGroupsResponse{}, resp) - assert.Equal(t, 9, len(resp.Groups)) - - groups := []string{ - "sysusers", - "users", - "sailing-lovers", - "violin-haters", - "radium-lovers", - "polonium-lovers", - "quantum-lovers", - "philosophy-haters", - "physics-lovers", - } - - for _, g := range groups { - assertResponseContainsGroup(t, resp, getGroup(g)) - } - cleanUp(t) -} - -func TestGetGroups(t *testing.T) { - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - groups := []string{ - "sysusers", - "users", - "sailing-lovers", - "violin-haters", - "radium-lovers", - "polonium-lovers", - "quantum-lovers", - "philosophy-haters", - "physics-lovers", - } - - for _, g := range groups { - group := getGroup(g) - req := &proto.GetGroupRequest{Id: group.Id} - resp, err := cl.GetGroup(context.Background(), req) - - assert.NoError(t, err) - assert.IsType(t, &proto.Group{}, resp) - assertGroupsSame(t, group, resp) - } - cleanUp(t) -} - -// https://github.com/owncloud/ocis/accounts/issues/61 -func TestCreateGroup(t *testing.T) { - group := &proto.Group{Id: "2d58e5ec-842e-498b-8800-61f2ec6f911f", GidNumber: 30042, OnPremisesSamAccountName: "quantum-group", DisplayName: "Quantum Group", Members: []*proto.Account{ - {Id: "4c510ada-c86b-4815-8820-42cdf82c3d51"}, // einstein - {Id: "932b4540-8d16-481e-8ef4-588e4b6b151c"}, // feynman - }} - - res, err := createGroup(t, group) - assert.NoError(t, err) - - assert.IsType(t, &proto.Group{}, res) - - // Should return the group but does not - // assertGroupsSame(t, res, group) - - groupsResponse := listGroups(t) - assertResponseContainsGroup(t, groupsResponse, group) - cleanUp(t) -} - -func TestGetGroupInvalidID(t *testing.T) { - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - req := &proto.GetGroupRequest{Id: "42"} - resp, err := cl.GetGroup(context.Background(), req) - - assert.IsType(t, &proto.Group{}, resp) - assert.Empty(t, resp) - assert.Error(t, err) - cleanUp(t) -} - -func TestDeleteGroup(t *testing.T) { - grp1 := getTestGroups("grp1") - grp2 := getTestGroups("grp2") - grp3 := getTestGroups("grp3") - _, err := createGroup(t, grp1) - assert.NoError(t, err) - _, err = createGroup(t, grp2) - assert.NoError(t, err) - _, err = createGroup(t, grp3) - assert.NoError(t, err) - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - req := &proto.DeleteGroupRequest{Id: grp1.Id} - res, err := cl.DeleteGroup(context.Background(), req) - assert.IsType(t, res, &empty.Empty{}) - assert.NoError(t, err) - - req = &proto.DeleteGroupRequest{Id: grp2.Id} - res, err = cl.DeleteGroup(context.Background(), req) - assert.IsType(t, res, &empty.Empty{}) - assert.NoError(t, err) - - groupsResponse := listGroups(t) - assertResponseNotContainsGroup(t, groupsResponse, grp1) - assertResponseNotContainsGroup(t, groupsResponse, grp2) - assertResponseContainsGroup(t, groupsResponse, grp3) - cleanUp(t) -} - -func TestDeleteGroupNotExisting(t *testing.T) { - invalidIds := []string{ - "$@dsfd", - "42", - "happyString", - "0ed84f08-aa0a-46e4-8e42-f0a5d6e1b059", - " ", - } - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - for _, id := range invalidIds { - req := &proto.DeleteGroupRequest{Id: id} - res, err := cl.DeleteGroup(context.Background(), req) - assert.IsType(t, &empty.Empty{}, res) - assert.Empty(t, res) - assert.Error(t, err) - } - cleanUp(t) -} - -func TestDeleteGroupInvalidId(t *testing.T) { - invalidIds := map[string]string{ - ".": ".", - "hello/world": "hello/world", - "/new-id": "/new-id", - "/new-id/": "/new-id", - "/0ed84f08-aa0a-46e4-8e42-f0a5d6e1b059": "/0ed84f08-aa0a-46e4-8e42-f0a5d6e1b059", - "": ".", - } - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - for id := range invalidIds { - req := &proto.DeleteGroupRequest{Id: id} - res, err := cl.DeleteGroup(context.Background(), req) - assert.IsType(t, &empty.Empty{}, res) - assert.Empty(t, res) - assert.Error(t, err) - } - cleanUp(t) -} - -func TestUpdateGroup(t *testing.T) { - grp1 := getTestGroups("grp1") - _, err := createGroup(t, grp1) - assert.NoError(t, err) - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - updateGrp := &proto.Group{ - Id: grp1.Id, - } - - req := &proto.UpdateGroupRequest{Group: updateGrp} - - res, err := cl.UpdateGroup(context.Background(), req) - - assert.IsType(t, &proto.Group{}, res) - assert.Empty(t, res) - assert.Error(t, err) - - cleanUp(t) -} - -// https://github.com/owncloud/ocis/accounts/issues/61 -func TestAddMember(t *testing.T) { - grp1 := getTestGroups("grp1") - account := getAccount("user1") - - updatedGroup := grp1 - updatedGroup.Members = append(updatedGroup.Members, &proto.Account{Id: account.Id}) - - _, err := createGroup(t, grp1) - assert.NoError(t, err) - _, err = createAccount(t, account.PreferredName) - assert.NoError(t, err) - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - req := &proto.AddMemberRequest{GroupId: grp1.Id, AccountId: account.Id} - - res, err := cl.AddMember(context.Background(), req) - assert.NoError(t, err) - - assert.IsType(t, &proto.Group{}, res) - - // Should return the group but returns empty - // assertGroupsSame(t, updatedGroup, res) - - resp := listGroups(t) - assertResponseContainsGroup(t, resp, updatedGroup) - - cleanUp(t) -} - -// https://github.com/owncloud/ocis/accounts/issues/62 -func TestAddMemberAlreadyInGroup(t *testing.T) { - grp1 := getTestGroups("grp1") - account := getAccount("user1") - - updatedGroup := grp1 - updatedGroup.Members = append(updatedGroup.Members, &proto.Account{Id: account.Id}) - - _, err := createGroup(t, grp1) - assert.NoError(t, err) - _, err = createAccount(t, account.PreferredName) - assert.NoError(t, err) - - _, err = addMemberToGroup(t, grp1.Id, account.Id) - assert.NoError(t, err) - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - req := &proto.AddMemberRequest{GroupId: grp1.Id, AccountId: account.Id} - - res, err := cl.AddMember(context.Background(), req) - - // Should Give Error - assert.NoError(t, err) - assert.IsType(t, &proto.Group{}, res) - //assert.Equal(t, proto.Group{}, *res) - //assertGroupsSame(t, updatedGroup, res) - - // Check the group is truly updated - resp := listGroups(t) - assertResponseContainsGroup(t, resp, updatedGroup) - - cleanUp(t) -} - -func TestAddMemberNonExisting(t *testing.T) { - grp1 := getTestGroups("grp1") - - _, err := createGroup(t, grp1) - assert.NoError(t, err) - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - invalidIds := []string{ - "$@dsfd", - "42", - "happyString", - "0ed84f08-aa0a-46e4-8e42-f0a5d6e1b059", - " ", - } - - for _, id := range invalidIds { - req := &proto.AddMemberRequest{GroupId: grp1.Id, AccountId: id} - - res, err := cl.AddMember(context.Background(), req) - assert.IsType(t, &proto.Group{}, res) - assert.Empty(t, res) - assert.Error(t, err) - } - - // Check group is not changed - resp := listGroups(t) - assertResponseContainsGroup(t, resp, grp1) - - cleanUp(t) -} - -func addMemberToGroup(t *testing.T, groupID, memberID string) (*proto.Group, error) { - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - req := &proto.AddMemberRequest{GroupId: groupID, AccountId: memberID} - - res, err := cl.AddMember(context.Background(), req) - - return res, err -} - -// https://github.com/owncloud/ocis/accounts/issues/61 -func TestRemoveMember(t *testing.T) { - grp1 := getTestGroups("grp1") - account := getAccount("user1") - - _, err := createGroup(t, grp1) - assert.NoError(t, err) - _, err = createAccount(t, account.PreferredName) - assert.NoError(t, err) - - _, err = addMemberToGroup(t, grp1.Id, account.Id) - assert.NoError(t, err) - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - req := &proto.RemoveMemberRequest{GroupId: grp1.Id, AccountId: account.Id} - - res, err := cl.RemoveMember(context.Background(), req) - assert.NoError(t, err) - - assert.IsType(t, &proto.Group{}, res) - //assert.Equal(t, proto.Group{}, *res) - // assertGroupsSame(t, grp1, res) - - resp := listGroups(t) - assertResponseContainsGroup(t, resp, grp1) - - cleanUp(t) -} - -func TestRemoveMemberNonExistingUser(t *testing.T) { - grp1 := getTestGroups("grp1") - - _, err := createGroup(t, grp1) - assert.NoError(t, err) - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - invalidIds := []string{ - "$@dsfd", - "42", - "happyString", - "0ed84f08-aa0a-46e4-8e42-f0a5d6e1b059", - " ", - } - - for _, id := range invalidIds { - req := &proto.RemoveMemberRequest{GroupId: grp1.Id, AccountId: id} - - res, err := cl.RemoveMember(context.Background(), req) - assert.IsType(t, &proto.Group{}, res) - assert.Empty(t, res) - assert.Error(t, err) - } - - // Check group is not changed - resp := listGroups(t) - assertResponseContainsGroup(t, resp, grp1) - cleanUp(t) -} - -// https://github.com/owncloud/ocis/accounts/issues/62 -func TestRemoveMemberNotInGroup(t *testing.T) { - grp1 := getTestGroups("grp1") - account := getAccount("user1") - - _, err := createGroup(t, grp1) - assert.NoError(t, err) - _, err = createAccount(t, account.PreferredName) - assert.NoError(t, err) - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - req := &proto.RemoveMemberRequest{GroupId: grp1.Id, AccountId: account.Id} - - res, err := cl.RemoveMember(context.Background(), req) - - // Should give an error - assert.NoError(t, err) - assert.IsType(t, &proto.Group{}, res) - - //assert.Error(t, err) - //assert.Equal( - // t, - // fmt.Sprintf("{\"id\":\".\",\"code\":404,\"detail\":\"User not found in the group\",\"status\":\"Not Found\"}", account.Id), - // err.Error(), - //) - - // Check group is not changed - resp := listGroups(t) - assertResponseContainsGroup(t, resp, grp1) - cleanUp(t) -} - -func TestListMembers(t *testing.T) { - groups := []string{ - "sysusers", - "users", - "sailing-lovers", - "violin-haters", - "radium-lovers", - "polonium-lovers", - "quantum-lovers", - "philosophy-haters", - "physics-lovers", - } - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - for _, group := range groups { - expectedGroup := getGroup(group) - req := &proto.ListMembersRequest{Id: expectedGroup.Id} - - res, err := cl.ListMembers(context.Background(), req) - assert.NoError(t, err) - - assert.Equal(t, len(res.Members), len(expectedGroup.Members)) - - for _, member := range expectedGroup.Members { - found := false - for _, resMember := range res.Members { - if resMember.Id == member.Id { - found = true - break - } - } - - if !found { - t.Fatalf("Group with Id %v Expected to be in response but not found", member.Id) - } - } - } - cleanUp(t) -} - -func TestListMembersEmptyGroup(t *testing.T) { - group := &proto.Group{Id: "5d58e5ec-842e-498b-8800-61f2ec6f911c", GidNumber: 60000, OnPremisesSamAccountName: "quantum-group", DisplayName: "Quantum Group", Members: []*proto.Account{}} - - client := mgrpcc.NewClient() - cl := proto.NewGroupsService("com.owncloud.api.accounts", client) - - request := &proto.CreateGroupRequest{Group: group} - _, err := cl.CreateGroup(context.Background(), request) - if err == nil { - newCreatedGroups = append(newCreatedGroups, group.Id) - } - - req := &proto.ListMembersRequest{Id: group.Id} - - listRes, err := cl.ListMembers(context.Background(), req) - - assert.NoError(t, err) - assert.Empty(t, listRes.Members) - - cleanUp(t) -} - -func TestAccountUpdateMask(t *testing.T) { - _, err := createAccount(t, "user1") - assert.NoError(t, err) - - user1 := getAccount("user1") - client := mgrpcc.NewClient() - req := &proto.UpdateAccountRequest{ - // We only want to update the display-name, rest should be ignored - UpdateMask: &field_mask.FieldMask{Paths: []string{"DisplayName"}}, - Account: &proto.Account{ - Id: user1.Id, - DisplayName: "ShouldBeUpdated", - PreferredName: "ShouldStaySame And Is Invalid Anyway", - }} - - cl := proto.NewAccountsService("com.owncloud.api.accounts", client) - res, err := cl.UpdateAccount(context.Background(), req) - assert.NoError(t, err) - - assert.Equal(t, "ShouldBeUpdated", res.DisplayName) - assert.Equal(t, user1.PreferredName, res.PreferredName) - - cleanUp(t) -} - -func TestAccountUpdateReadOnlyField(t *testing.T) { - _, err := createAccount(t, "user1") - assert.NoError(t, err) - - user1 := getAccount("user1") - client := mgrpcc.NewClient() - req := &proto.UpdateAccountRequest{ - // We only want to update the display-name, rest should be ignored - UpdateMask: &field_mask.FieldMask{Paths: []string{"CreatedDateTime"}}, - Account: &proto.Account{ - Id: user1.Id, - CreatedDateTime: timestamppb.Now(), - }} - - cl := proto.NewAccountsService("com.owncloud.api.accounts", client) - res, err := cl.UpdateAccount(context.Background(), req) - assert.Nil(t, res) - assert.Error(t, err) - - var e *merrors.Error - - if errors.As(err, &e) { - assert.EqualValues(t, 400, e.Code) - assert.Equal(t, "Bad Request", e.Status) - } else { - t.Fatal("Unexpected error type") - } - - cleanUp(t) -} diff --git a/accounts/pkg/proto/v0/accounts.pb.web.go b/accounts/pkg/proto/v0/accounts.pb.web.go deleted file mode 100644 index 139bee0dc..000000000 --- a/accounts/pkg/proto/v0/accounts.pb.web.go +++ /dev/null @@ -1,1217 +0,0 @@ -// Code generated by protoc-gen-microweb. DO NOT EDIT. -// source: proto.proto - -package proto - -import ( - "bytes" - "encoding/json" - "net/http" - - "github.com/go-chi/chi/v5" - "github.com/go-chi/render" - "github.com/golang/protobuf/jsonpb" - - ptypesempty "github.com/golang/protobuf/ptypes/empty" -) - -type webAccountsServiceHandler struct { - r chi.Router - h AccountsServiceHandler -} - -func (h *webAccountsServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - h.r.ServeHTTP(w, r) -} - -func (h *webAccountsServiceHandler) ListAccounts(w http.ResponseWriter, r *http.Request) { - req := &ListAccountsRequest{} - resp := &ListAccountsResponse{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.ListAccounts( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webAccountsServiceHandler) GetAccount(w http.ResponseWriter, r *http.Request) { - req := &GetAccountRequest{} - resp := &Account{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.GetAccount( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webAccountsServiceHandler) CreateAccount(w http.ResponseWriter, r *http.Request) { - req := &CreateAccountRequest{} - resp := &Account{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.CreateAccount( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webAccountsServiceHandler) UpdateAccount(w http.ResponseWriter, r *http.Request) { - req := &UpdateAccountRequest{} - resp := &Account{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.UpdateAccount( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webAccountsServiceHandler) DeleteAccount(w http.ResponseWriter, r *http.Request) { - req := &DeleteAccountRequest{} - resp := &ptypesempty.Empty{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.DeleteAccount( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusNoContent) - render.NoContent(w, r) -} - -func RegisterAccountsServiceWeb(r chi.Router, i AccountsServiceHandler, middlewares ...func(http.Handler) http.Handler) { - handler := &webAccountsServiceHandler{ - r: r, - h: i, - } - - r.MethodFunc("POST", "/api/v0/accounts/accounts-list", handler.ListAccounts) - r.MethodFunc("POST", "/api/v0/accounts/accounts-get", handler.GetAccount) - r.MethodFunc("POST", "/api/v0/accounts/accounts-create", handler.CreateAccount) - r.MethodFunc("POST", "/api/v0/accounts/accounts-update", handler.UpdateAccount) - r.MethodFunc("POST", "/api/v0/accounts/accounts-delete", handler.DeleteAccount) -} - -type webGroupsServiceHandler struct { - r chi.Router - h GroupsServiceHandler -} - -func (h *webGroupsServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - h.r.ServeHTTP(w, r) -} - -func (h *webGroupsServiceHandler) ListGroups(w http.ResponseWriter, r *http.Request) { - req := &ListGroupsRequest{} - resp := &ListGroupsResponse{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.ListGroups( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webGroupsServiceHandler) GetGroup(w http.ResponseWriter, r *http.Request) { - req := &GetGroupRequest{} - resp := &Group{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.GetGroup( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webGroupsServiceHandler) CreateGroup(w http.ResponseWriter, r *http.Request) { - req := &CreateGroupRequest{} - resp := &Group{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.CreateGroup( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webGroupsServiceHandler) UpdateGroup(w http.ResponseWriter, r *http.Request) { - req := &UpdateGroupRequest{} - resp := &Group{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.UpdateGroup( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webGroupsServiceHandler) DeleteGroup(w http.ResponseWriter, r *http.Request) { - req := &DeleteGroupRequest{} - resp := &ptypesempty.Empty{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.DeleteGroup( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusNoContent) - render.NoContent(w, r) -} - -func (h *webGroupsServiceHandler) AddMember(w http.ResponseWriter, r *http.Request) { - req := &AddMemberRequest{} - resp := &Group{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.AddMember( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webGroupsServiceHandler) RemoveMember(w http.ResponseWriter, r *http.Request) { - req := &RemoveMemberRequest{} - resp := &Group{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.RemoveMember( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func (h *webGroupsServiceHandler) ListMembers(w http.ResponseWriter, r *http.Request) { - req := &ListMembersRequest{} - resp := &ListMembersResponse{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.ListMembers( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func RegisterGroupsServiceWeb(r chi.Router, i GroupsServiceHandler, middlewares ...func(http.Handler) http.Handler) { - handler := &webGroupsServiceHandler{ - r: r, - h: i, - } - - r.MethodFunc("POST", "/api/v0/accounts/groups-list", handler.ListGroups) - r.MethodFunc("POST", "/api/v0/accounts/groups-get", handler.GetGroup) - r.MethodFunc("POST", "/api/v0/accounts/groups-create", handler.CreateGroup) - r.MethodFunc("POST", "/api/v0/accounts/groups-update", handler.UpdateGroup) - r.MethodFunc("POST", "/api/v0/accounts/groups-delete", handler.DeleteGroup) - r.MethodFunc("POST", "/api/v0/groups/{group_id=*}/members/$ref", handler.AddMember) - r.MethodFunc("POST", "/api/v0/groups/{group_id=*}/members/{account_id}/$ref", handler.RemoveMember) - r.MethodFunc("POST", "/api/v0/groups/{id=*}/members/$ref", handler.ListMembers) -} - -type webIndexServiceHandler struct { - r chi.Router - h IndexServiceHandler -} - -func (h *webIndexServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { - h.r.ServeHTTP(w, r) -} - -func (h *webIndexServiceHandler) RebuildIndex(w http.ResponseWriter, r *http.Request) { - req := &RebuildIndexRequest{} - resp := &RebuildIndexResponse{} - - if err := json.NewDecoder(r.Body).Decode(&req); err != nil { - http.Error(w, err.Error(), http.StatusPreconditionFailed) - return - } - - if err := h.h.RebuildIndex( - r.Context(), - req, - resp, - ); err != nil { - http.Error(w, err.Error(), http.StatusBadRequest) - return - } - - render.Status(r, http.StatusCreated) - render.JSON(w, r, resp) -} - -func RegisterIndexServiceWeb(r chi.Router, i IndexServiceHandler, middlewares ...func(http.Handler) http.Handler) { - handler := &webIndexServiceHandler{ - r: r, - h: i, - } - - r.MethodFunc("POST", "/api/v0/index/rebuild", handler.RebuildIndex) -} - -// RebuildIndexRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of RebuildIndexRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var RebuildIndexRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *RebuildIndexRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := RebuildIndexRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*RebuildIndexRequest)(nil) - -// RebuildIndexRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of RebuildIndexRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var RebuildIndexRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *RebuildIndexRequest) UnmarshalJSON(b []byte) error { - return RebuildIndexRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*RebuildIndexRequest)(nil) - -// RebuildIndexResponseJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of RebuildIndexResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var RebuildIndexResponseJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *RebuildIndexResponse) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := RebuildIndexResponseJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*RebuildIndexResponse)(nil) - -// RebuildIndexResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of RebuildIndexResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var RebuildIndexResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *RebuildIndexResponse) UnmarshalJSON(b []byte) error { - return RebuildIndexResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*RebuildIndexResponse)(nil) - -// ListAccountsRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListAccountsRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListAccountsRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListAccountsRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListAccountsRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListAccountsRequest)(nil) - -// ListAccountsRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListAccountsRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListAccountsRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListAccountsRequest) UnmarshalJSON(b []byte) error { - return ListAccountsRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListAccountsRequest)(nil) - -// ListAccountsResponseJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListAccountsResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListAccountsResponseJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListAccountsResponse) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListAccountsResponseJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListAccountsResponse)(nil) - -// ListAccountsResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListAccountsResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListAccountsResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListAccountsResponse) UnmarshalJSON(b []byte) error { - return ListAccountsResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListAccountsResponse)(nil) - -// GetAccountRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of GetAccountRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var GetAccountRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *GetAccountRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := GetAccountRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*GetAccountRequest)(nil) - -// GetAccountRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of GetAccountRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var GetAccountRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *GetAccountRequest) UnmarshalJSON(b []byte) error { - return GetAccountRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*GetAccountRequest)(nil) - -// CreateAccountRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of CreateAccountRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var CreateAccountRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *CreateAccountRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := CreateAccountRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*CreateAccountRequest)(nil) - -// CreateAccountRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of CreateAccountRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var CreateAccountRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *CreateAccountRequest) UnmarshalJSON(b []byte) error { - return CreateAccountRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*CreateAccountRequest)(nil) - -// UpdateAccountRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of UpdateAccountRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var UpdateAccountRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *UpdateAccountRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := UpdateAccountRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*UpdateAccountRequest)(nil) - -// UpdateAccountRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of UpdateAccountRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var UpdateAccountRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *UpdateAccountRequest) UnmarshalJSON(b []byte) error { - return UpdateAccountRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*UpdateAccountRequest)(nil) - -// DeleteAccountRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of DeleteAccountRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var DeleteAccountRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *DeleteAccountRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := DeleteAccountRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*DeleteAccountRequest)(nil) - -// DeleteAccountRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of DeleteAccountRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var DeleteAccountRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *DeleteAccountRequest) UnmarshalJSON(b []byte) error { - return DeleteAccountRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*DeleteAccountRequest)(nil) - -// AccountJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of Account. This struct is safe to replace or modify but -// should not be done so concurrently. -var AccountJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *Account) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := AccountJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*Account)(nil) - -// AccountJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of Account. This struct is safe to replace or modify but -// should not be done so concurrently. -var AccountJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *Account) UnmarshalJSON(b []byte) error { - return AccountJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*Account)(nil) - -// IdentitiesJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of Identities. This struct is safe to replace or modify but -// should not be done so concurrently. -var IdentitiesJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *Identities) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := IdentitiesJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*Identities)(nil) - -// IdentitiesJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of Identities. This struct is safe to replace or modify but -// should not be done so concurrently. -var IdentitiesJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *Identities) UnmarshalJSON(b []byte) error { - return IdentitiesJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*Identities)(nil) - -// PasswordProfileJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of PasswordProfile. This struct is safe to replace or modify but -// should not be done so concurrently. -var PasswordProfileJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *PasswordProfile) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := PasswordProfileJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*PasswordProfile)(nil) - -// PasswordProfileJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of PasswordProfile. This struct is safe to replace or modify but -// should not be done so concurrently. -var PasswordProfileJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *PasswordProfile) UnmarshalJSON(b []byte) error { - return PasswordProfileJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*PasswordProfile)(nil) - -// ListGroupsRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListGroupsRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListGroupsRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListGroupsRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListGroupsRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListGroupsRequest)(nil) - -// ListGroupsRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListGroupsRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListGroupsRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListGroupsRequest) UnmarshalJSON(b []byte) error { - return ListGroupsRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListGroupsRequest)(nil) - -// ListGroupsResponseJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListGroupsResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListGroupsResponseJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListGroupsResponse) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListGroupsResponseJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListGroupsResponse)(nil) - -// ListGroupsResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListGroupsResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListGroupsResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListGroupsResponse) UnmarshalJSON(b []byte) error { - return ListGroupsResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListGroupsResponse)(nil) - -// GetGroupRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of GetGroupRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var GetGroupRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *GetGroupRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := GetGroupRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*GetGroupRequest)(nil) - -// GetGroupRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of GetGroupRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var GetGroupRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *GetGroupRequest) UnmarshalJSON(b []byte) error { - return GetGroupRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*GetGroupRequest)(nil) - -// CreateGroupRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of CreateGroupRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var CreateGroupRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *CreateGroupRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := CreateGroupRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*CreateGroupRequest)(nil) - -// CreateGroupRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of CreateGroupRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var CreateGroupRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *CreateGroupRequest) UnmarshalJSON(b []byte) error { - return CreateGroupRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*CreateGroupRequest)(nil) - -// UpdateGroupRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of UpdateGroupRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var UpdateGroupRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *UpdateGroupRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := UpdateGroupRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*UpdateGroupRequest)(nil) - -// UpdateGroupRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of UpdateGroupRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var UpdateGroupRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *UpdateGroupRequest) UnmarshalJSON(b []byte) error { - return UpdateGroupRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*UpdateGroupRequest)(nil) - -// DeleteGroupRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of DeleteGroupRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var DeleteGroupRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *DeleteGroupRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := DeleteGroupRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*DeleteGroupRequest)(nil) - -// DeleteGroupRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of DeleteGroupRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var DeleteGroupRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *DeleteGroupRequest) UnmarshalJSON(b []byte) error { - return DeleteGroupRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*DeleteGroupRequest)(nil) - -// AddMemberRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of AddMemberRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var AddMemberRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *AddMemberRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := AddMemberRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*AddMemberRequest)(nil) - -// AddMemberRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of AddMemberRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var AddMemberRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *AddMemberRequest) UnmarshalJSON(b []byte) error { - return AddMemberRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*AddMemberRequest)(nil) - -// RemoveMemberRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of RemoveMemberRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var RemoveMemberRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *RemoveMemberRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := RemoveMemberRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*RemoveMemberRequest)(nil) - -// RemoveMemberRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of RemoveMemberRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var RemoveMemberRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *RemoveMemberRequest) UnmarshalJSON(b []byte) error { - return RemoveMemberRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*RemoveMemberRequest)(nil) - -// ListMembersRequestJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListMembersRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListMembersRequestJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListMembersRequest) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListMembersRequestJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListMembersRequest)(nil) - -// ListMembersRequestJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListMembersRequest. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListMembersRequestJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListMembersRequest) UnmarshalJSON(b []byte) error { - return ListMembersRequestJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListMembersRequest)(nil) - -// ListMembersResponseJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of ListMembersResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListMembersResponseJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *ListMembersResponse) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := ListMembersResponseJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*ListMembersResponse)(nil) - -// ListMembersResponseJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of ListMembersResponse. This struct is safe to replace or modify but -// should not be done so concurrently. -var ListMembersResponseJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *ListMembersResponse) UnmarshalJSON(b []byte) error { - return ListMembersResponseJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*ListMembersResponse)(nil) - -// GroupJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of Group. This struct is safe to replace or modify but -// should not be done so concurrently. -var GroupJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *Group) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := GroupJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*Group)(nil) - -// GroupJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of Group. This struct is safe to replace or modify but -// should not be done so concurrently. -var GroupJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *Group) UnmarshalJSON(b []byte) error { - return GroupJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*Group)(nil) - -// OnPremisesProvisioningErrorJSONMarshaler describes the default jsonpb.Marshaler used by all -// instances of OnPremisesProvisioningError. This struct is safe to replace or modify but -// should not be done so concurrently. -var OnPremisesProvisioningErrorJSONMarshaler = new(jsonpb.Marshaler) - -// MarshalJSON satisfies the encoding/json Marshaler interface. This method -// uses the more correct jsonpb package to correctly marshal the message. -func (m *OnPremisesProvisioningError) MarshalJSON() ([]byte, error) { - if m == nil { - return json.Marshal(nil) - } - - buf := &bytes.Buffer{} - - if err := OnPremisesProvisioningErrorJSONMarshaler.Marshal(buf, m); err != nil { - return nil, err - } - - return buf.Bytes(), nil -} - -var _ json.Marshaler = (*OnPremisesProvisioningError)(nil) - -// OnPremisesProvisioningErrorJSONUnmarshaler describes the default jsonpb.Unmarshaler used by all -// instances of OnPremisesProvisioningError. This struct is safe to replace or modify but -// should not be done so concurrently. -var OnPremisesProvisioningErrorJSONUnmarshaler = new(jsonpb.Unmarshaler) - -// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method -// uses the more correct jsonpb package to correctly unmarshal the message. -func (m *OnPremisesProvisioningError) UnmarshalJSON(b []byte) error { - return OnPremisesProvisioningErrorJSONUnmarshaler.Unmarshal(bytes.NewReader(b), m) -} - -var _ json.Unmarshaler = (*OnPremisesProvisioningError)(nil) diff --git a/accounts/pkg/proto/v0/accounts.swagger.json b/accounts/pkg/proto/v0/accounts.swagger.json deleted file mode 100644 index 4f02b5ff2..000000000 --- a/accounts/pkg/proto/v0/accounts.swagger.json +++ /dev/null @@ -1,1067 +0,0 @@ -{ - "swagger": "2.0", - "info": { - "title": "ownCloud Infinite Scale accounts", - "version": "1.0.0", - "contact": { - "name": "ownCloud GmbH", - "url": "https://github.com/owncloud/ocis", - "email": "support@owncloud.com" - }, - "license": { - "name": "Apache-2.0", - "url": "https://github.com/owncloud/ocis/blob/master/LICENSE" - } - }, - "tags": [ - { - "name": "AccountsService" - }, - { - "name": "GroupsService" - }, - { - "name": "IndexService" - } - ], - "schemes": [ - "http", - "https" - ], - "consumes": [ - "application/json" - ], - "produces": [ - "application/json" - ], - "paths": { - "/api/v0/accounts/accounts-create": { - "post": { - "summary": "Creates an account", - "operationId": "AccountsService_CreateAccount", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0Account" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0CreateAccountRequest" - } - } - ], - "tags": [ - "AccountsService" - ] - } - }, - "/api/v0/accounts/accounts-delete": { - "post": { - "summary": "Deletes an account", - "operationId": "AccountsService_DeleteAccount", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0DeleteAccountRequest" - } - } - ], - "tags": [ - "AccountsService" - ] - } - }, - "/api/v0/accounts/accounts-get": { - "post": { - "summary": "Gets an account", - "operationId": "AccountsService_GetAccount", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0Account" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0GetAccountRequest" - } - } - ], - "tags": [ - "AccountsService" - ] - } - }, - "/api/v0/accounts/accounts-list": { - "post": { - "summary": "Lists accounts", - "operationId": "AccountsService_ListAccounts", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0ListAccountsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0ListAccountsRequest" - } - } - ], - "tags": [ - "AccountsService" - ] - } - }, - "/api/v0/accounts/accounts-update": { - "post": { - "summary": "Updates an account", - "operationId": "AccountsService_UpdateAccount", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0Account" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0UpdateAccountRequest" - } - } - ], - "tags": [ - "AccountsService" - ] - } - }, - "/api/v0/accounts/groups-create": { - "post": { - "summary": "Creates a group", - "operationId": "GroupsService_CreateGroup", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0Group" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0CreateGroupRequest" - } - } - ], - "tags": [ - "GroupsService" - ] - } - }, - "/api/v0/accounts/groups-delete": { - "post": { - "summary": "Deletes a group", - "operationId": "GroupsService_DeleteGroup", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "properties": {} - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0DeleteGroupRequest" - } - } - ], - "tags": [ - "GroupsService" - ] - } - }, - "/api/v0/accounts/groups-get": { - "post": { - "summary": "Gets an groups", - "operationId": "GroupsService_GetGroup", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0Group" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0GetGroupRequest" - } - } - ], - "tags": [ - "GroupsService" - ] - } - }, - "/api/v0/accounts/groups-list": { - "post": { - "summary": "Lists groups", - "operationId": "GroupsService_ListGroups", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0ListGroupsResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0ListGroupsRequest" - } - } - ], - "tags": [ - "GroupsService" - ] - } - }, - "/api/v0/accounts/groups-update": { - "post": { - "summary": "Updates a group", - "operationId": "GroupsService_UpdateGroup", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0Group" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0UpdateGroupRequest" - } - } - ], - "tags": [ - "GroupsService" - ] - } - }, - "/api/v0/groups/{groupId}/members/$ref": { - "post": { - "summary": "group:addmember https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0\u0026tabs=http", - "operationId": "GroupsService_AddMember", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0Group" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "groupId", - "description": "The id of the group to add a member to", - "in": "path", - "required": true, - "type": "string", - "pattern": "[^/]+" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "accountId": { - "type": "string", - "title": "The account id to add" - } - } - } - } - ], - "tags": [ - "GroupsService" - ] - } - }, - "/api/v0/groups/{groupId}/members/{accountId}/$ref": { - "post": { - "summary": "group:removemember https://docs.microsoft.com/en-us/graph/api/group-delete-members?view=graph-rest-1.0", - "operationId": "GroupsService_RemoveMember", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0Group" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "groupId", - "description": "The id of the group to remove a member from", - "in": "path", - "required": true, - "type": "string", - "pattern": "[^/]+" - }, - { - "name": "accountId", - "description": "The account id to remove", - "in": "path", - "required": true, - "type": "string" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "tags": [ - "GroupsService" - ] - } - }, - "/api/v0/groups/{id}/members/$ref": { - "post": { - "summary": "group:listmembers https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0", - "operationId": "GroupsService_ListMembers", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0ListMembersResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "id", - "description": "The id of the group to list members from", - "in": "path", - "required": true, - "type": "string", - "pattern": "[^/]+" - }, - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object", - "properties": { - "pageSize": { - "type": "integer", - "format": "int32" - }, - "pageToken": { - "type": "string", - "title": "Optional. A pagination token returned from a previous call to `Get`\nthat indicates from where search should continue" - }, - "fieldMask": { - "type": "string", - "description": "Optional. Used to specify a subset of fields that should be\nreturned by a get operation or modified by an update operation." - }, - "query": { - "type": "string", - "description": "TODO update query language\nQuery expressions can be used to restrict results based upon\nthe account properties where the operators `=`, `NOT`, `AND` and `OR`\ncan be used along with the suffix wildcard symbol `*`.\n\nThe string properties in a query expression should use escaped quotes\nfor values that include whitespace to prevent unexpected behavior.\n\nSome example queries are:\n\n* Query `display_name=Th*` returns accounts whose display_name\nstarts with \"Th\"\n* Query `display_name=\\\\\"Test String\\\\\"` returns groups with\ndisplay names that include both \"Test\" and \"String\"", - "title": "Optional. Search criteria used to select the groups to return.\nIf no search criteria is specified then all groups will be\nreturned" - } - } - } - } - ], - "tags": [ - "GroupsService" - ] - } - }, - "/api/v0/index/rebuild": { - "post": { - "operationId": "IndexService_RebuildIndex", - "responses": { - "200": { - "description": "A successful response.", - "schema": { - "$ref": "#/definitions/v0RebuildIndexResponse" - } - }, - "default": { - "description": "An unexpected error response.", - "schema": { - "$ref": "#/definitions/rpcStatus" - } - } - }, - "parameters": [ - { - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/v0RebuildIndexRequest" - } - } - ], - "tags": [ - "IndexService" - ] - } - } - }, - "definitions": { - "protobufAny": { - "type": "object", - "properties": { - "@type": { - "type": "string" - } - }, - "additionalProperties": {} - }, - "rpcStatus": { - "type": "object", - "properties": { - "code": { - "type": "integer", - "format": "int32" - }, - "message": { - "type": "string" - }, - "details": { - "type": "array", - "items": { - "$ref": "#/definitions/protobufAny" - } - } - } - }, - "v0Account": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the user. Key. Not nullable. Non reassignable. Read-only." - }, - "accountEnabled": { - "type": "boolean", - "description": "*true* if the account is enabled; otherwise, *false*. This property is required when a user is created. Supports $filter." - }, - "isResourceAccount": { - "type": "boolean", - "description": "A resource account is also known as a /disabled user object/ in Azure AD, and can be used to represent resources in general.\nIn Exchange it might be used to represent conference rooms, for example, and allow them to have a phone number.\nYou could give printers or machines with a sync client resource accounts as well.\nA resource account can be homed in Microsoft 365 or on premises using Skype for Business Server 2019.\n*true* if the user is a resource account; otherwise, *false*. Null value should be considered false." - }, - "creationType": { - "type": "string", - "description": "Indicates whether the account was created as\n- a regular school or work account (\"\" / emptystring),\n- a local account, fully managed by oCIS (LocalAccount), includes synced accounts or\n- an external account (Invitation),\n- self-service sign-up using email verification (EmailVerified). Read-only." - }, - "identities": { - "type": "array", - "items": { - "$ref": "#/definitions/v0Identities" - }, - "description": "Represents the identities that can be used to sign in to this account.\nAn identity can be provided by oCIS (also known as a local account), by organizations, or by social identity providers such as Facebook, Google, and Microsoft, and is tied to an account.\nMay contain multiple items with the same signInType value. Supports $filter." - }, - "displayName": { - "type": "string", - "title": "The name displayed in the address book for the account.\nThis is usually the combination of the user's first name, middle initial and last name.\nThis property is required when a user is created and it cannot be cleared during updates.\nSupports $filter and $orderby.\nposixaccount MUST cn" - }, - "preferredName": { - "type": "string", - "title": "The username\nposixaccount MUST uid" - }, - "uidNumber": { - "type": "string", - "format": "int64", - "title": "TODO rename to on_premise_? or move to extension? see https://docs.microsoft.com/en-us/graph/extensibility-open-users\nused for exposing the user using ldap\nposixaccount MUST uidnumber" - }, - "gidNumber": { - "type": "string", - "format": "int64", - "title": "used for exposing the user using ldap\nposixaccount MUST gidnumber" - }, - "mail": { - "type": "string", - "title": "The SMTP address for the user, for example, \"jeff@contoso.onmicrosoft.com\". Read-Only. Supports $filter.\ninetorgperson MAY mail" - }, - "description": { - "type": "string", - "title": "A description, useful for resource accounts\nposixaccount MAY description" - }, - "passwordProfile": { - "$ref": "#/definitions/v0PasswordProfile", - "title": "Specifies the password profile for the user.\nThe profile contains the user’s password. This property is required when a user is created.\nThe password in the profile must satisfy minimum requirements as specified by the passwordPolicies property.\nBy default, a strong password is required.\nposixaccount MAY authPassword" - }, - "memberOf": { - "type": "array", - "items": { - "$ref": "#/definitions/v0Group" - }, - "title": "The groups, directory roles and administrative units that the user is a member of. Read-only. Nullable.\nshould we only respond with repeated strings of ids? no clients should a proper filter mask!" - }, - "createdDateTime": { - "type": "string", - "format": "date-time", - "description": "The created date of the account object." - }, - "deletedDateTime": { - "type": "string", - "format": "date-time", - "description": "The date and time the user was deleted. Returned only on $select." - }, - "onPremisesSyncEnabled": { - "type": "boolean", - "title": "*true* if this object is synced from an on-premises directory;\n*false* if this object was originally synced from an on-premises directory but is no longer synced;\nnull if this object has never been synced from an on-premises directory (default). Read-only" - }, - "onPremisesImmutableId": { - "type": "string", - "description": "This property is used to associate an on-premises LDAP user to the oCIS account object.\nThis property must be specified when creating a new user account in the Graph if you are using a federated domain for the user’s userPrincipalName (UPN) property.\nImportant: The $ and _ characters cannot be used when specifying this property. Supports $filter." - }, - "onPremisesSecurityIdentifier": { - "type": "string", - "description": "Contains the on-premises security identifier (SID) for the user that was synchronized from on-premises to the cloud. Read-only." - }, - "onPremisesDistinguishedName": { - "type": "string", - "description": "Contains the on-premises LDAP `distinguished name` or `DN`.\nThe property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only." - }, - "onPremisesSamAccountName": { - "type": "string", - "description": "Contains the on-premises `samAccountName` synchronized from the on-premises directory.\nThe property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only." - }, - "onPremisesDomainName": { - "type": "string", - "description": "Contains the on-premises `domainFQDN`, also called `dnsDomainName` synchronized from the on-premises directory\nThe property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only." - }, - "onPremisesUserPrincipalName": { - "type": "string", - "description": "Contains the on-premises userPrincipalName synchronized from the on-premises directory.\nThe property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only." - }, - "onPremisesLastSyncDateTime": { - "type": "string", - "format": "date-time", - "description": "Indicates the last time at which the object was synced with the on-premises directory; Read-only." - }, - "onPremisesProvisioningErrors": { - "type": "array", - "items": { - "$ref": "#/definitions/v0OnPremisesProvisioningError" - }, - "description": "Errors when using synchronization during provisioning." - }, - "externalUserState": { - "type": "string", - "description": "For an external user invited to the tenant using the invitation API, this property represents the invited user's invitation status.\nFor invited users, the state can be `PendingAcceptance` or `Accepted`, or \"\" / emptystring for all other users.\nReturned only on $select. Supports $filter with the supported values. For example: $filter=externalUserState eq 'PendingAcceptance'." - }, - "externalUserStateChangeDateTime": { - "type": "string", - "format": "date-time", - "description": "Shows the timestamp for the latest change to the externalUserState property. Returned only on $select." - }, - "refreshTokensValidFromDateTime": { - "type": "string", - "format": "date-time", - "description": "Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get\nan error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph).\nIf this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint.\nReturned only on $select. Read-only. Use invalidateAllRefreshTokens to reset." - }, - "signInSessionsValidFromDateTime": { - "type": "string", - "format": "date-time", - "description": "Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get\nan error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph).\nIf this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint.\nRead-only. Use revokeSignInSessions to reset." - } - }, - "title": "Account follows the properties of the ms graph api user resource.\nSee https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0#properties" - }, - "v0CreateAccountRequest": { - "type": "object", - "properties": { - "account": { - "$ref": "#/definitions/v0Account", - "title": "The account resource to create" - } - } - }, - "v0CreateGroupRequest": { - "type": "object", - "properties": { - "group": { - "$ref": "#/definitions/v0Group", - "title": "The account resource to create" - } - } - }, - "v0DeleteAccountRequest": { - "type": "object", - "properties": { - "id": { - "type": "string" - } - } - }, - "v0DeleteGroupRequest": { - "type": "object", - "properties": { - "id": { - "type": "string" - } - } - }, - "v0GetAccountRequest": { - "type": "object", - "properties": { - "id": { - "type": "string" - } - } - }, - "v0GetGroupRequest": { - "type": "object", - "properties": { - "id": { - "type": "string" - } - } - }, - "v0Group": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "The unique identifier for the group.\nReturned by default. Inherited from directoryObject. Key. Not nullable. Read-only." - }, - "displayName": { - "type": "string", - "title": "The display name for the group. This property is required when a group is created and cannot be cleared during updates.\nReturned by default. Supports $filter and $orderby.\ngroupofnames MUST cn" - }, - "members": { - "type": "array", - "items": { - "$ref": "#/definitions/v0Account" - }, - "title": "Users, contacts, and groups that are members of this group. HTTP Methods: GET (supported for all groups), POST (supported for security groups and mail-enabled security groups), DELETE (supported only for security groups) Read-only. Nullable.\nTODO accounts (users) only for now, we can add groups with the dedicated message using oneof construct later" - }, - "owners": { - "type": "array", - "items": { - "$ref": "#/definitions/v0Account" - }, - "title": "groupofnames MAY businessCategory\ngroupofnames MAY o\ngroupofnames MAY ou\ngroupofnames MAY owner, SINGLE-VALUE but there might be multiple owners" - }, - "description": { - "type": "string", - "title": "An optional description for the group. Returned by default.\ngroupofnames MAY description" - }, - "gidNumber": { - "type": "string", - "format": "int64", - "title": "used for exposing the user using ldap\nposixgroup MUST gidnumber" - }, - "createdDateTime": { - "type": "string", - "format": "date-time", - "description": "Timestamp of when the group was created. The value cannot be modified and is automatically populated when the group is created\nReturned by default. Read-only." - }, - "deletedDateTime": { - "type": "string", - "format": "date-time", - "description": "For some Azure Active Directory objects (user, group, application), if the object is deleted, it is first logically deleted, and this property is updated with the date and time when the object was deleted. Otherwise this property is null. If the object is restored, this property is updated to null.\nReturned by default. Read-only." - }, - "expirationDateTime": { - "type": "string", - "format": "date-time", - "description": "Timestamp of when the group is set to expire. The value cannot be modified and is automatically populated when the group is created.\nReturned by default. Read-only." - }, - "hideFromAddressLists": { - "type": "boolean", - "description": "True if the group is not displayed in certain parts of the Outlook user interface:\nin the Address Book, in address lists for selecting message recipients, and in the Browse Groups dialog for searching groups; false otherwise. Default value is false.\nReturned only on $select." - }, - "visibility": { - "type": "string", - "description": "Specifies the visibility of an Office 365 group. Possible values are: Private, Public, or Hiddenmembership; blank values are treated as public. See group visibility options to learn more.\nVisibility can be set only when a group is created; it is not editable.\nReturned by default." - }, - "onPremisesSyncEnabled": { - "type": "boolean", - "description": "*true* if this group is synced from an on-premises directory;\n*false* if this group was originally synced from an on-premises directory but is no longer synced;\nnull if this object has never been synced from an on-premises directory (default).\nReturned by default. Read-only. Supports $filter." - }, - "onPremisesImmutableId": { - "type": "string", - "description": "This property is used to associate an on-premises LDAP user to the oCIS account object.\nThis property must be specified when creating a new user account in the Graph if you are using a federated domain for the user’s userPrincipalName (UPN) property.\nImportant: The $ and _ characters cannot be used when specifying this property. Supports $filter." - }, - "onPremisesSecurityIdentifier": { - "type": "string", - "description": "Contains the on-premises security identifier (SID) for the group that was synchronized from on-premises to the cloud. Returned by default. Read-only." - }, - "onPremisesDistinguishedName": { - "type": "string", - "description": "Contains the on-premises LDAP `distinguished name` or `DN`.\nThe property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only." - }, - "onPremisesSamAccountName": { - "type": "string", - "description": "Contains the on-premises `samAccountName` synchronized from the on-premises directory.\nThe property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Returned by default. Read-only." - }, - "onPremisesDomainName": { - "type": "string", - "description": "Contains the on-premises domain FQDN, also called dnsDomainName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect.\nReturned by default. Read-only." - }, - "onPremisesNetBiosName": { - "type": "string", - "description": "Contains the on-premises netBios name synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect.\nReturned by default. Read-only." - }, - "onPremisesLastSyncDateTime": { - "type": "string", - "description": "Indicates the last time at which the group was synced with the on-premises directory.\nReturned by default. Read-only. Supports $filter." - }, - "onPremisesProvisioningErrors": { - "type": "array", - "items": { - "$ref": "#/definitions/v0OnPremisesProvisioningError" - }, - "description": "Errors when using synchronization during provisioning." - } - } - }, - "v0Identities": { - "type": "object", - "properties": { - "signInType": { - "type": "string", - "description": "Specifies the user sign-in types in your directory, such as `emailAddress`, `userName` or `federated`.\nHere, federated represents a unique identifier for a user from an issuer, that can be in any format chosen by the issuer.\nAdditional validation is enforced on *issuer_assigned_id* when the sign-in type is set to `emailAddress` or `userName`.\nThis property can also be set to any custom string." - }, - "issuer": { - "type": "string", - "description": "Specifies the issuer of the identity, for example facebook.com.\nFor local accounts (where signInType is not federated), this property is\nthe local B2C tenant default domain name, for example contoso.onmicrosoft.com.\nFor external users from other Azure AD organization, this will be the domain of\nthe federated organization, for example contoso.com.\nSupports $filter. 512 character limit." - }, - "issuerAssignedId": { - "type": "string", - "description": "Specifies the unique identifier assigned to the user by the issuer. The combination of *issuer* and *issuerAssignedId* must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts).\nWhen *signInType* is set to:\n* `emailAddress`, (or starts with `emailAddress` like `emailAddress1`) *issuerAssignedId* must be a valid email address\n* `userName`, issuer_assigned_id must be a valid local part of an email address\nSupports $filter. 512 character limit." - } - }, - "description": "Identities Represents an identity used to sign in to a user account.\nAn identity can be provided by oCIS, by organizations, or by social identity providers such as Facebook, Google, or Microsoft, that are tied to a user account.\nThis enables the user to sign in to the user account with any of those associated identities.\nThey are also used to keep a history of old usernames." - }, - "v0ListAccountsRequest": { - "type": "object", - "properties": { - "pageSize": { - "type": "integer", - "format": "int32", - "title": "Optional. The maximum number of accounts to return in the response" - }, - "pageToken": { - "type": "string", - "title": "Optional. A pagination token returned from a previous call to `Get`\nthat indicates from where search should continue" - }, - "fieldMask": { - "type": "string", - "description": "Optional. Used to specify a subset of fields that should be\nreturned by a get operation or modified by an update operation." - }, - "query": { - "type": "string", - "description": "TODO update query language\nQuery expressions can be used to restrict results based upon\nthe account properties where the operators `=`, `NOT`, `AND` and `OR`\ncan be used along with the suffix wildcard symbol `*`.\n\nThe string properties in a query expression should use escaped quotes\nfor values that include whitespace to prevent unexpected behavior.\n\nSome example queries are:\n\n* Query `display_name=Th*` returns accounts whose display_name\nstarts with \"Th\"\n* Query `email=foo@example.com` returns accounts with\n`email` set to `foo@example.com`\n* Query `display_name=\\\\\"Test String\\\\\"` returns accounts with\ndisplay names that include both \"Test\" and \"String\"", - "title": "Optional. Search criteria used to select the accounts to return.\nIf no search criteria is specified then all accounts will be\nreturned" - } - } - }, - "v0ListAccountsResponse": { - "type": "object", - "properties": { - "accounts": { - "type": "array", - "items": { - "$ref": "#/definitions/v0Account" - }, - "title": "The field name should match the noun \"accounts\" in the method name. There\nwill be a maximum number of items returned based on the page_size field\nin the request" - }, - "nextPageToken": { - "type": "string", - "title": "Token to retrieve the next page of results, or empty if there are no\nmore results in the list" - } - } - }, - "v0ListGroupsRequest": { - "type": "object", - "properties": { - "pageSize": { - "type": "integer", - "format": "int32", - "title": "Optional. The maximum number of groups to return in the response" - }, - "pageToken": { - "type": "string", - "title": "Optional. A pagination token returned from a previous call to `Get`\nthat indicates from where search should continue" - }, - "fieldMask": { - "type": "string", - "description": "Optional. Used to specify a subset of fields that should be\nreturned by a get operation or modified by an update operation." - }, - "query": { - "type": "string", - "description": "TODO update query language\nQuery expressions can be used to restrict results based upon\nthe account properties where the operators `=`, `NOT`, `AND` and `OR`\ncan be used along with the suffix wildcard symbol `*`.\n\nThe string properties in a query expression should use escaped quotes\nfor values that include whitespace to prevent unexpected behavior.\n\nSome example queries are:\n\n* Query `display_name=Th*` returns accounts whose display_name\nstarts with \"Th\"\n* Query `display_name=\\\\\"Test String\\\\\"` returns groups with\ndisplay names that include both \"Test\" and \"String\"", - "title": "Optional. Search criteria used to select the groups to return.\nIf no search criteria is specified then all groups will be\nreturned" - } - } - }, - "v0ListGroupsResponse": { - "type": "object", - "properties": { - "groups": { - "type": "array", - "items": { - "$ref": "#/definitions/v0Group" - }, - "title": "The field name should match the noun \"group\" in the method name. There\nwill be a maximum number of items returned based on the page_size field\nin the request" - }, - "nextPageToken": { - "type": "string", - "title": "Token to retrieve the next page of results, or empty if there are no\nmore results in the list" - } - } - }, - "v0ListMembersResponse": { - "type": "object", - "properties": { - "members": { - "type": "array", - "items": { - "$ref": "#/definitions/v0Account" - }, - "title": "The field name should match the noun \"members\" in the method name. There\nwill be a maximum number of items returned based on the page_size field\nin the request" - }, - "nextPageToken": { - "type": "string", - "title": "Token to retrieve the next page of results, or empty if there are no\nmore results in the list" - } - } - }, - "v0OnPremisesProvisioningError": { - "type": "object", - "properties": { - "category": { - "type": "string", - "description": "Category of the provisioning error. Note: Currently, there is only one possible value. Possible value: PropertyConflict - indicates a property value is not unique. Other objects contain the same value for the property." - }, - "occurredDateTime": { - "type": "string", - "format": "date-time", - "description": "The date and time at which the error occurred." - }, - "propertyCausingError": { - "type": "string", - "title": "Name of the directory property causing the error. Current possible values: UserPrincipalName or ProxyAddress" - }, - "value": { - "type": "string", - "description": "Value of the property causing the error." - } - } - }, - "v0PasswordProfile": { - "type": "object", - "properties": { - "password": { - "type": "string", - "description": "The password for the user. This property is required when a user is created.\nIt can be updated, but the user will be required to change the password on the next login.\nThe password must satisfy minimum requirements as specified by the user’s passwordPolicies property. By default, a strong password is required." - }, - "lastPasswordChangeDateTime": { - "type": "string", - "format": "date-time", - "description": "The time when this account last changed their password." - }, - "passwordPolicies": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Specifies password policies for the user.\nThis value is an enumeration with one possible value being “DisableStrongPassword”, which allows weaker passwords than the default policy to be specified.\n“DisablePasswordExpiration” can also be specified." - }, - "forceChangePasswordNextSignIn": { - "type": "boolean", - "description": "*true* if the user must change her password on the next login; otherwise false." - }, - "forceChangePasswordNextSignInWithMfa": { - "type": "boolean", - "description": "If *true*, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false." - } - } - }, - "v0RebuildIndexRequest": { - "type": "object" - }, - "v0RebuildIndexResponse": { - "type": "object" - }, - "v0UpdateAccountRequest": { - "type": "object", - "properties": { - "account": { - "$ref": "#/definitions/v0Account", - "title": "The account resource which replaces the resource on the server" - }, - "updateMask": { - "type": "string", - "title": "The update mask applies to the resource. For the `FieldMask` definition,\nsee https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask" - } - } - }, - "v0UpdateGroupRequest": { - "type": "object", - "properties": { - "group": { - "$ref": "#/definitions/v0Group", - "title": "The group resource which replaces the resource on the server" - }, - "updateMask": { - "type": "string", - "title": "The update mask applies to the resource. For the `FieldMask` definition,\nsee https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask" - } - } - } - }, - "externalDocs": { - "description": "Developer Manual", - "url": "https://owncloud.dev/extensions/accounts/" - } -} diff --git a/accounts/proto/v0/accounts.proto b/accounts/proto/v0/accounts.proto deleted file mode 100644 index 3a52b5648..000000000 --- a/accounts/proto/v0/accounts.proto +++ /dev/null @@ -1,697 +0,0 @@ -syntax = "proto3"; - -package com.owncloud.ocis.accounts.v0; - -option go_package = "github.com/owncloud/ocis/accounts/pkg/proto/v0;proto"; - -import "google/api/field_behavior.proto"; -import "google/api/annotations.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; -import "google/protobuf/timestamp.proto"; - -import "protoc-gen-openapiv2/options/annotations.proto"; - -option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { - info: { - title: "ownCloud Infinite Scale accounts"; - version: "1.0.0"; - contact: { - name: "ownCloud GmbH"; - url: "https://github.com/owncloud/ocis"; - email: "support@owncloud.com"; - }; - license: { - name: "Apache-2.0"; - url: "https://github.com/owncloud/ocis/blob/master/LICENSE"; - }; - }; - schemes: HTTP; - schemes: HTTPS; - consumes: "application/json"; - produces: "application/json"; - external_docs: { - description: "Developer Manual"; - url: "https://owncloud.dev/extensions/accounts/"; - }; -}; - -// Follow recommended Methods for rpc APIs https://cloud.google.com/apis/design/resources?hl=de#methods -// https://cloud.google.com/apis/design/standard_methods?hl=de#list -// https://cloud.google.com/apis/design/naming_convention?hl=de -service AccountsService { - // Lists accounts - rpc ListAccounts(ListAccountsRequest) returns (ListAccountsResponse) { - // List method maps to HTTP GET - option (google.api.http) = { - post: "/api/v0/accounts/accounts-list", - body: "*" - }; - } - // Gets an account - rpc GetAccount(GetAccountRequest) returns (Account) { - option (google.api.http) = { - post: "/api/v0/accounts/accounts-get", - body: "*" - }; - } - // Creates an account - rpc CreateAccount(CreateAccountRequest) returns (Account) { - // Create maps to HTTP POST. URL path as the collection name. - // HTTP request body contains the resource - option (google.api.http) = { - post: "/api/v0/accounts/accounts-create" - body: "*" - }; - } - // Updates an account - rpc UpdateAccount(UpdateAccountRequest) returns (Account) { - // Update maps to HTTP PATCH. Resource name is mapped to a URL path. - // Resource is contained in the HTTP request body - option (google.api.http) = { - post: "/api/v0/accounts/accounts-update" - body: "*" - }; - }; - // Deletes an account - rpc DeleteAccount(DeleteAccountRequest) returns (google.protobuf.Empty) { - // Delete maps to HTTP DELETE. Resource name maps to the URL path. - // There is no request body - option (google.api.http) = { - post: "/api/v0/accounts/accounts-delete", - body: "*" - }; - } -} - -service GroupsService { - // Lists groups - rpc ListGroups(ListGroupsRequest) returns (ListGroupsResponse) { - // List method maps to HTTP GET - option (google.api.http) = { - post: "/api/v0/accounts/groups-list", - body: "*" - }; - } - // Gets an groups - rpc GetGroup(GetGroupRequest) returns (Group) { - option (google.api.http) = { - post: "/api/v0/accounts/groups-get", - body: "*" - }; - } - // Creates a group - rpc CreateGroup(CreateGroupRequest) returns (Group) { - // Create maps to HTTP POST. URL path as the collection name. - // HTTP request body contains the resource - option (google.api.http) = { - post: "/api/v0/accounts/groups-create" - body: "*" - }; - } - // Updates a group - rpc UpdateGroup(UpdateGroupRequest) returns (Group) { - // Update maps to HTTP PATCH. Resource name is mapped to a URL path. - // Resource is contained in the HTTP request body - option (google.api.http) = { - post: "/api/v0/accounts/groups-update" - body: "*" - }; - }; - // Deletes a group - rpc DeleteGroup(DeleteGroupRequest) returns (google.protobuf.Empty) { - // Delete maps to HTTP DELETE. Resource name maps to the URL path. - // There is no request body - option (google.api.http) = { - post: "/api/v0/accounts/groups-delete", - body: "*" - }; - } - - // additional group methods: https://docs.microsoft.com/en-us/graph/api/resources/group?view=graph-rest-1.0#methods - - // references are accessed using $ref, see http://docs.oasis-open.org/odata/odata/v4.0/cs01/part2-url-conventions/odata-v4.0-cs01-part2-url-conventions.html#_Toc365046422 - // or the stack overflow question https://stackoverflow.com/questions/49362894/why-is-the-microsoft-graph-api-using-ref-in-the-uri - - // group:addmember https://docs.microsoft.com/en-us/graph/api/group-post-members?view=graph-rest-1.0&tabs=http - rpc AddMember(AddMemberRequest) returns (Group) { - // All request parameters go into body. - option (google.api.http) = { - post: "/api/v0/groups/{group_id=*}/members/$ref" - body: "*" - }; - } - // group:removemember https://docs.microsoft.com/en-us/graph/api/group-delete-members?view=graph-rest-1.0 - rpc RemoveMember(RemoveMemberRequest) returns (Group) { - // All request parameters go into body. - option (google.api.http) = { - // URLs are broken - post: "/api/v0/groups/{group_id=*}/members/{account_id}/$ref" - body: "*" - }; - } - // group:listmembers https://docs.microsoft.com/en-us/graph/api/group-list-members?view=graph-rest-1.0 - rpc ListMembers(ListMembersRequest) returns (ListMembersResponse) { - // All request parameters go into body. - option (google.api.http) = { - // URLs are broken - post: "/api/v0/groups/{id=*}/members/$ref" - body: "*" - }; - } - -} - -service IndexService { - rpc RebuildIndex(RebuildIndexRequest) returns (RebuildIndexResponse) { - // All request parameters go into body. - option (google.api.http) = { - // URLs are broken - post: "/api/v0/index/rebuild" - body: "*" - }; - } -} - -message RebuildIndexRequest { -} - -message RebuildIndexResponse { -} - -message ListAccountsRequest { - // Optional. The maximum number of accounts to return in the response - int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A pagination token returned from a previous call to `Get` - // that indicates from where search should continue - string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Used to specify a subset of fields that should be - // returned by a get operation or modified by an update operation. - google.protobuf.FieldMask field_mask = 3; - - // Optional. Search criteria used to select the accounts to return. - // If no search criteria is specified then all accounts will be - // returned - // - // TODO update query language - // Query expressions can be used to restrict results based upon - // the account properties where the operators `=`, `NOT`, `AND` and `OR` - // can be used along with the suffix wildcard symbol `*`. - // - // The string properties in a query expression should use escaped quotes - // for values that include whitespace to prevent unexpected behavior. - // - // Some example queries are: - // - // * Query `display_name=Th*` returns accounts whose display_name - // starts with "Th" - // * Query `email=foo@example.com` returns accounts with - // `email` set to `foo@example.com` - // * Query `display_name=\\"Test String\\"` returns accounts with - // display names that include both "Test" and "String" - string query = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -message ListAccountsResponse { - // The field name should match the noun "accounts" in the method name. There - // will be a maximum number of items returned based on the page_size field - // in the request - repeated Account accounts = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list - string next_page_token = 2; -} - -message GetAccountRequest { - string id = 1; -} - -message CreateAccountRequest { - // The account resource to create - Account account = 1; -} - -message UpdateAccountRequest { - // The account resource which replaces the resource on the server - Account account = 1; - - // The update mask applies to the resource. For the `FieldMask` definition, - // see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - google.protobuf.FieldMask update_mask = 2; - } - -message DeleteAccountRequest { - string id = 1; -} - -// Account follows the properties of the ms graph api user resource. -// See https://docs.microsoft.com/en-us/graph/api/resources/user?view=graph-rest-1.0#properties -message Account { - - // Note that field numbers in the range 1 through 15 take one byte to encode, including the field number and the field's type - - // The unique identifier for the user. Key. Not nullable. Non reassignable. Read-only. - string id = 1; - - // *true* if the account is enabled; otherwise, *false*. This property is required when a user is created. Supports $filter. - bool account_enabled = 2; - - // A resource account is also known as a /disabled user object/ in Azure AD, and can be used to represent resources in general. - // In Exchange it might be used to represent conference rooms, for example, and allow them to have a phone number. - // You could give printers or machines with a sync client resource accounts as well. - // A resource account can be homed in Microsoft 365 or on premises using Skype for Business Server 2019. - // *true* if the user is a resource account; otherwise, *false*. Null value should be considered false. - bool is_resource_account = 3; - - // Indicates whether the account was created as - // - a regular school or work account ("" / emptystring), - // - a local account, fully managed by oCIS (LocalAccount), includes synced accounts or - // - an external account (Invitation), - // - self-service sign-up using email verification (EmailVerified). Read-only. - string creation_type = 4; - - // Represents the identities that can be used to sign in to this account. - // An identity can be provided by oCIS (also known as a local account), by organizations, or by social identity providers such as Facebook, Google, and Microsoft, and is tied to an account. - // May contain multiple items with the same signInType value. Supports $filter. - repeated Identities identities = 5; - - // posixaccount properties - - // The name displayed in the address book for the account. - // This is usually the combination of the user's first name, middle initial and last name. - // This property is required when a user is created and it cannot be cleared during updates. - // Supports $filter and $orderby. - // posixaccount MUST cn - string display_name = 6; - - // The username - // posixaccount MUST uid - string preferred_name = 7; - - // TODO rename to on_premise_? or move to extension? see https://docs.microsoft.com/en-us/graph/extensibility-open-users - // used for exposing the user using ldap - // posixaccount MUST uidnumber - int64 uid_number = 8; - - // used for exposing the user using ldap - // posixaccount MUST gidnumber - int64 gid_number = 9; - - // posixaccount MUST homedirectory - // constructed dynamically in glauth - - // posixaccount MAY loginshell - // posixaccount MAY gecos - - // For the GECOS field: - // - User's full name (or application name, if the account is for a program) -> displayname (description) - // - Building and room number or contact person -> - - // - Office telephone number -> - - // - Any other contact information (pager number, fax, etc.) -> mail - // eg "Albert Einstein (Beware! I'm doing science!),,,einstein@example.com" as the gecos - - // The SMTP address for the user, for example, "jeff@contoso.onmicrosoft.com". Read-Only. Supports $filter. - // inetorgperson MAY mail - string mail = 10; - - // A description, useful for resource accounts - // posixaccount MAY description - string description = 11; - - // Specifies the password profile for the user. - // The profile contains the user’s password. This property is required when a user is created. - // The password in the profile must satisfy minimum requirements as specified by the passwordPolicies property. - // By default, a strong password is required. - // posixaccount MAY authPassword - PasswordProfile password_profile = 12; - - // The groups, directory roles and administrative units that the user is a member of. Read-only. Nullable. - // should we only respond with repeated strings of ids? no clients should a proper filter mask! - repeated Group memberOf = 13; - - // Field numbers in the range 16 through 2047 take two bytes. So you should reserve the field numbers 1 through 15 for very frequently occurring message elements. Remember to leave some room for frequently occurring elements that might be added in the future. - - // The created date of the account object. - google.protobuf.Timestamp created_date_time = 16; - - // The date and time the user was deleted. Returned only on $select. - google.protobuf.Timestamp deleted_date_time = 17; - - // properties for sync - - // *true* if this object is synced from an on-premises directory; - // *false* if this object was originally synced from an on-premises directory but is no longer synced; - // null if this object has never been synced from an on-premises directory (default). Read-only - bool on_premises_sync_enabled = 20; - - // This property is used to associate an on-premises LDAP user to the oCIS account object. - // This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user’s userPrincipalName (UPN) property. - // Important: The $ and _ characters cannot be used when specifying this property. Supports $filter. - string on_premises_immutable_id = 21; - - // Contains the on-premises security identifier (SID) for the user that was synchronized from on-premises to the cloud. Read-only. - string on_premises_security_identifier = 22; - - // Contains the on-premises LDAP `distinguished name` or `DN`. - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. - string on_premises_distinguished_name = 23; - - // Contains the on-premises `samAccountName` synchronized from the on-premises directory. - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. - string on_premises_sam_account_name = 24; - - // Contains the on-premises `domainFQDN`, also called `dnsDomainName` synchronized from the on-premises directory - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. - string on_premises_domain_name = 25; - - // Contains the on-premises userPrincipalName synchronized from the on-premises directory. - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. - string on_premises_user_principal_name = 26; - - // Contains extensionAttributes 1-15 for the user. Note that the individual extension attributes are neither selectable nor filterable. - // For an onPremisesSyncEnabled user, this set of properties is mastered on-premises and is read-only. - // For a cloud-only user (where onPremisesSyncEnabled is false), these properties may be set during creation or update. - //onPremisesExtensionAttributes onPremisesExtensionAttributes = 27 - - // Indicates the last time at which the object was synced with the on-premises directory; Read-only. - google.protobuf.Timestamp on_premises_last_sync_date_time = 28; - - // Errors when using synchronization during provisioning. - repeated OnPremisesProvisioningError on_premises_provisioning_errors = 29; - - // TODO do we need to sync uidnumber and gidnumber from the external ldap? we may assign different numbers so eos has a non colliding namespace. - // we can sync them to the (uid|gid)_number fields but what if they changed in the external ldap and now collide? - // move those properties to a posixaccount message so we can exchange that part with an external (readonly or writeable) ldap server? - - // For an external user invited to the tenant using the invitation API, this property represents the invited user's invitation status. - // For invited users, the state can be `PendingAcceptance` or `Accepted`, or "" / emptystring for all other users. - // Returned only on $select. Supports $filter with the supported values. For example: $filter=externalUserState eq 'PendingAcceptance'. - string external_user_state = 40; - - // Shows the timestamp for the latest change to the externalUserState property. Returned only on $select. - google.protobuf.Timestamp external_user_state_change_date_time = 41; - - // Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get - // an error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph). - // If this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint. - // Returned only on $select. Read-only. Use invalidateAllRefreshTokens to reset. - google.protobuf.Timestamp refresh_tokens_valid_from_date_time = 60; - - // Any refresh tokens or sessions tokens (session cookies) issued before this time are invalid, and applications will get - // an error when using an invalid refresh or sessions token to acquire a delegated access token (to access APIs such as Microsoft Graph). - // If this happens, the application will need to acquire a new refresh token by making a request to the authorize endpoint. - // Read-only. Use revokeSignInSessions to reset. - google.protobuf.Timestamp sign_in_sessions_valid_from_date_time = 61; -} - -// Identities Represents an identity used to sign in to a user account. -// An identity can be provided by oCIS, by organizations, or by social identity providers such as Facebook, Google, or Microsoft, that are tied to a user account. -// This enables the user to sign in to the user account with any of those associated identities. -// They are also used to keep a history of old usernames. -message Identities { - // Specifies the user sign-in types in your directory, such as `emailAddress`, `userName` or `federated`. - // Here, federated represents a unique identifier for a user from an issuer, that can be in any format chosen by the issuer. - // Additional validation is enforced on *issuer_assigned_id* when the sign-in type is set to `emailAddress` or `userName`. - // This property can also be set to any custom string. - string sign_in_type = 1; - - // Specifies the issuer of the identity, for example facebook.com. - // For local accounts (where signInType is not federated), this property is - // the local B2C tenant default domain name, for example contoso.onmicrosoft.com. - // For external users from other Azure AD organization, this will be the domain of - // the federated organization, for example contoso.com. - // Supports $filter. 512 character limit. - string issuer = 2; - - // Specifies the unique identifier assigned to the user by the issuer. The combination of *issuer* and *issuerAssignedId* must be unique within the organization. Represents the sign-in name for the user, when signInType is set to emailAddress or userName (also known as local accounts). - // When *signInType* is set to: - // * `emailAddress`, (or starts with `emailAddress` like `emailAddress1`) *issuerAssignedId* must be a valid email address - // * `userName`, issuer_assigned_id must be a valid local part of an email address - // Supports $filter. 512 character limit. - string issuer_assigned_id = 3; -} -message PasswordProfile { - // The password for the user. This property is required when a user is created. - // It can be updated, but the user will be required to change the password on the next login. - // The password must satisfy minimum requirements as specified by the user’s passwordPolicies property. By default, a strong password is required. - string password = 1; - - // The time when this account last changed their password. - google.protobuf.Timestamp last_password_change_date_time = 2; - - // Specifies password policies for the user. - //This value is an enumeration with one possible value being “DisableStrongPassword”, which allows weaker passwords than the default policy to be specified. - // “DisablePasswordExpiration” can also be specified. - repeated string password_policies = 3; - - // *true* if the user must change her password on the next login; otherwise false. - bool force_change_password_next_sign_in = 4; - - // If *true*, at next sign-in, the user must perform a multi-factor authentication (MFA) before being forced to change their password. The behavior is identical to forceChangePasswordNextSignIn except that the user is required to first perform a multi-factor authentication before password change. After a password change, this property will be automatically reset to false. If not set, default is false. - bool force_change_password_next_sign_in_with_mfa = 5; -} - -message ListGroupsRequest { - // Optional. The maximum number of groups to return in the response - int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A pagination token returned from a previous call to `Get` - // that indicates from where search should continue - string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Used to specify a subset of fields that should be - // returned by a get operation or modified by an update operation. - google.protobuf.FieldMask field_mask = 3; - - // Optional. Search criteria used to select the groups to return. - // If no search criteria is specified then all groups will be - // returned - // - // TODO update query language - // Query expressions can be used to restrict results based upon - // the account properties where the operators `=`, `NOT`, `AND` and `OR` - // can be used along with the suffix wildcard symbol `*`. - // - // The string properties in a query expression should use escaped quotes - // for values that include whitespace to prevent unexpected behavior. - // - // Some example queries are: - // - // * Query `display_name=Th*` returns accounts whose display_name - // starts with "Th" - // * Query `display_name=\\"Test String\\"` returns groups with - // display names that include both "Test" and "String" - string query = 4 [(google.api.field_behavior) = OPTIONAL]; -} - -message ListGroupsResponse { - // The field name should match the noun "group" in the method name. There - // will be a maximum number of items returned based on the page_size field - // in the request - repeated Group groups = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list - string next_page_token = 2; -} - -message GetGroupRequest { - string id = 1; -} - -message CreateGroupRequest { - // The account resource to create - Group group = 1; -} - -message UpdateGroupRequest { - // The group resource which replaces the resource on the server - Group group = 1; - - // The update mask applies to the resource. For the `FieldMask` definition, - // see https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#fieldmask - google.protobuf.FieldMask update_mask = 2; - } - -message DeleteGroupRequest { - string id = 1; -} - -message AddMemberRequest { - // The id of the group to add a member to - string group_id = 1; - // The account id to add - string account_id = 2; -} - -message RemoveMemberRequest { - // The id of the group to remove a member from - string group_id = 1; - // The account id to remove - string account_id = 2; -} - -message ListMembersRequest { - int32 page_size = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A pagination token returned from a previous call to `Get` - // that indicates from where search should continue - string page_token = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. Used to specify a subset of fields that should be - // returned by a get operation or modified by an update operation. - google.protobuf.FieldMask field_mask = 3; - - // Optional. Search criteria used to select the groups to return. - // If no search criteria is specified then all groups will be - // returned - // - // TODO update query language - // Query expressions can be used to restrict results based upon - // the account properties where the operators `=`, `NOT`, `AND` and `OR` - // can be used along with the suffix wildcard symbol `*`. - // - // The string properties in a query expression should use escaped quotes - // for values that include whitespace to prevent unexpected behavior. - // - // Some example queries are: - // - // * Query `display_name=Th*` returns accounts whose display_name - // starts with "Th" - // * Query `display_name=\\"Test String\\"` returns groups with - // display names that include both "Test" and "String" - string query = 4 [(google.api.field_behavior) = OPTIONAL]; - - // The id of the group to list members from - string id = 5; -} - -message ListMembersResponse { - // The field name should match the noun "members" in the method name. There - // will be a maximum number of items returned based on the page_size field - // in the request - repeated Account members = 1; - - // Token to retrieve the next page of results, or empty if there are no - // more results in the list - string next_page_token = 2; -} - -message Group { - - // The unique identifier for the group. - // Returned by default. Inherited from directoryObject. Key. Not nullable. Read-only. - string id = 1; - - // groupofnames - - // The display name for the group. This property is required when a group is created and cannot be cleared during updates. - // Returned by default. Supports $filter and $orderby. - // groupofnames MUST cn - string display_name = 2; - // groupofnames MUST/MAY member - - // Users, contacts, and groups that are members of this group. HTTP Methods: GET (supported for all groups), POST (supported for security groups and mail-enabled security groups), DELETE (supported only for security groups) Read-only. Nullable. - // TODO accounts (users) only for now, we can add groups with the dedicated message using oneof construct later - repeated Account members = 3; - - // groupofnames MAY businessCategory - // groupofnames MAY o - // groupofnames MAY ou - // groupofnames MAY owner, SINGLE-VALUE but there might be multiple owners - repeated Account owners = 4; - - // An optional description for the group. Returned by default. - // groupofnames MAY description - string description = 5; - - // groupofnames MAY seeAlso - - // posixgroup - - // used for exposing the user using ldap - // posixgroup MUST gidnumber - int64 gid_number = 6; - // posixgroup MAY authPassword - // posixgroup MAY userPassword - // posixgroup MAY memberUid -> groupofnames member - // posixgroup MAY description -> groupofnames - - - // Timestamp of when the group was created. The value cannot be modified and is automatically populated when the group is created - // Returned by default. Read-only. - google.protobuf.Timestamp created_date_time = 7; - - // For some Azure Active Directory objects (user, group, application), if the object is deleted, it is first logically deleted, and this property is updated with the date and time when the object was deleted. Otherwise this property is null. If the object is restored, this property is updated to null. - // Returned by default. Read-only. - google.protobuf.Timestamp deleted_date_time = 8; - - // Timestamp of when the group is set to expire. The value cannot be modified and is automatically populated when the group is created. - // Returned by default. Read-only. - google.protobuf.Timestamp expiration_date_time = 9; - - // True if the group is not displayed in certain parts of the Outlook user interface: - // in the Address Book, in address lists for selecting message recipients, and in the Browse Groups dialog for searching groups; false otherwise. Default value is false. - // Returned only on $select. - bool hide_from_address_lists = 10; - - // Specifies the visibility of an Office 365 group. Possible values are: Private, Public, or Hiddenmembership; blank values are treated as public. See group visibility options to learn more. - // Visibility can be set only when a group is created; it is not editable. - // Returned by default. - string visibility = 11; - - // Field numbers in the range 16 through 2047 take two bytes. So you should reserve the field numbers 1 through 15 for very frequently occurring message elements. Remember to leave some room for frequently occurring elements that might be added in the future. - - // properties for sync - - // *true* if this group is synced from an on-premises directory; - // *false* if this group was originally synced from an on-premises directory but is no longer synced; - // null if this object has never been synced from an on-premises directory (default). - // Returned by default. Read-only. Supports $filter. - bool on_premises_sync_enabled = 20; - - // This property is used to associate an on-premises LDAP user to the oCIS account object. - // This property must be specified when creating a new user account in the Graph if you are using a federated domain for the user’s userPrincipalName (UPN) property. - // Important: The $ and _ characters cannot be used when specifying this property. Supports $filter. - string on_premises_immutable_id = 21; - - // Contains the on-premises security identifier (SID) for the group that was synchronized from on-premises to the cloud. Returned by default. Read-only. - string on_premises_security_identifier = 22; - - // Contains the on-premises LDAP `distinguished name` or `DN`. - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Read-only. - string on_premises_distinguished_name = 23; - - // Contains the on-premises `samAccountName` synchronized from the on-premises directory. - // The property is only populated for customers who are synchronizing their on-premises directory to ocis-accounts. Returned by default. Read-only. - string on_premises_sam_account_name = 24; - - // Contains the on-premises domain FQDN, also called dnsDomainName synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. - // Returned by default. Read-only. - string on_premises_domain_name = 25; - - // Contains the on-premises netBios name synchronized from the on-premises directory. The property is only populated for customers who are synchronizing their on-premises directory to Azure Active Directory via Azure AD Connect. - // Returned by default. Read-only. - string on_premises_net_bios_name = 26; - - // Indicates the last time at which the group was synced with the on-premises directory. - // Returned by default. Read-only. Supports $filter. - string on_premises_last_sync_date_time = 27; - - // Errors when using synchronization during provisioning. - repeated OnPremisesProvisioningError on_premises_provisioning_errors = 28; -} - -message OnPremisesProvisioningError { - // Category of the provisioning error. Note: Currently, there is only one possible value. Possible value: PropertyConflict - indicates a property value is not unique. Other objects contain the same value for the property. - string category = 1; - // The date and time at which the error occurred. - google.protobuf.Timestamp occurred_date_time = 2; - // Name of the directory property causing the error. Current possible values: UserPrincipalName or ProxyAddress - string property_causing_error = 3; - // Value of the property causing the error. - string value = 4; -}