github.com/cloudwan/edgelq-sdk@v1.15.4/audit/resources/v1/activity_log/activity_log.pb.collections.go (about)

     1  // Code generated by protoc-gen-goten-resource
     2  // Resource: ActivityLog
     3  // DO NOT EDIT!!!
     4  
     5  package activity_log
     6  
     7  import (
     8  	gotenresource "github.com/cloudwan/goten-sdk/runtime/resource"
     9  )
    10  
    11  // proto imports
    12  import (
    13  	common "github.com/cloudwan/edgelq-sdk/audit/resources/v1/common"
    14  	rpc "github.com/cloudwan/edgelq-sdk/common/rpc"
    15  	iam_organization "github.com/cloudwan/edgelq-sdk/iam/resources/v1/organization"
    16  	iam_project "github.com/cloudwan/edgelq-sdk/iam/resources/v1/project"
    17  	meta_service "github.com/cloudwan/goten-sdk/meta-service/resources/v1/service"
    18  	meta "github.com/cloudwan/goten-sdk/types/meta"
    19  	anypb "google.golang.org/protobuf/types/known/anypb"
    20  	fieldmaskpb "google.golang.org/protobuf/types/known/fieldmaskpb"
    21  	timestamppb "google.golang.org/protobuf/types/known/timestamppb"
    22  )
    23  
    24  // ensure the imports are used
    25  var (
    26  	_ = new(gotenresource.ListQuery)
    27  )
    28  
    29  // make sure we're using proto imports
    30  var (
    31  	_ = &common.Authentication{}
    32  	_ = &rpc.Status{}
    33  	_ = &iam_organization.Organization{}
    34  	_ = &iam_project.Project{}
    35  	_ = &anypb.Any{}
    36  	_ = &fieldmaskpb.FieldMask{}
    37  	_ = &timestamppb.Timestamp{}
    38  	_ = &meta_service.Service{}
    39  	_ = &meta.Meta{}
    40  )
    41  
    42  type ActivityLogList []*ActivityLog
    43  
    44  func (l ActivityLogList) Append(item gotenresource.Resource) gotenresource.ResourceList {
    45  	return append(l, item.(*ActivityLog))
    46  }
    47  
    48  func (l ActivityLogList) AppendList(list gotenresource.ResourceList) gotenresource.ResourceList {
    49  	return append(l, list.(ActivityLogList)...)
    50  }
    51  
    52  func (l ActivityLogList) Slice(first, second int) gotenresource.ResourceList {
    53  	if first > 0 && second > 0 {
    54  		return l[first:second]
    55  	} else if first > 0 {
    56  		return l[first:]
    57  	} else if second > 0 {
    58  		return l[:second]
    59  	}
    60  	return l[:]
    61  }
    62  
    63  func (l ActivityLogList) At(idx int) gotenresource.Resource {
    64  	return l[idx]
    65  }
    66  
    67  func (l ActivityLogList) Set(idx int, res gotenresource.Resource) {
    68  	l[idx] = res.(*ActivityLog)
    69  }
    70  
    71  func (l ActivityLogList) Length() int {
    72  	return len(l)
    73  }
    74  
    75  type ActivityLogNameList []*Name
    76  
    77  func (l ActivityLogNameList) Append(name gotenresource.Name) gotenresource.NameList {
    78  	return append(l, name.(*Name))
    79  }
    80  
    81  func (l ActivityLogNameList) AppendList(list gotenresource.NameList) gotenresource.NameList {
    82  	return append(l, list.(ActivityLogNameList)...)
    83  }
    84  
    85  func (l ActivityLogNameList) Slice(first, second int) gotenresource.NameList {
    86  	if first > 0 && second > 0 {
    87  		return l[first:second]
    88  	} else if first > 0 {
    89  		return l[first:]
    90  	} else if second > 0 {
    91  		return l[:second]
    92  	}
    93  	return l[:]
    94  }
    95  
    96  func (l ActivityLogNameList) At(idx int) gotenresource.Name {
    97  	return l[idx]
    98  }
    99  
   100  func (l ActivityLogNameList) Set(idx int, name gotenresource.Name) {
   101  	l[idx] = name.(*Name)
   102  }
   103  
   104  func (l ActivityLogNameList) Length() int {
   105  	return len(l)
   106  }
   107  
   108  type ActivityLogReferenceList []*Reference
   109  
   110  func (l ActivityLogReferenceList) Append(ref gotenresource.Reference) gotenresource.ReferenceList {
   111  	return append(l, ref.(*Reference))
   112  }
   113  
   114  func (l ActivityLogReferenceList) AppendList(list gotenresource.ReferenceList) gotenresource.ReferenceList {
   115  	return append(l, list.(ActivityLogReferenceList)...)
   116  }
   117  
   118  func (l ActivityLogReferenceList) Slice(first, second int) gotenresource.ReferenceList {
   119  	if first > 0 && second > 0 {
   120  		return l[first:second]
   121  	} else if first > 0 {
   122  		return l[first:]
   123  	} else if second > 0 {
   124  		return l[:second]
   125  	}
   126  	return l[:]
   127  }
   128  
   129  func (l ActivityLogReferenceList) At(idx int) gotenresource.Reference {
   130  	return l[idx]
   131  }
   132  
   133  func (l ActivityLogReferenceList) Set(idx int, ref gotenresource.Reference) {
   134  	l[idx] = ref.(*Reference)
   135  }
   136  
   137  func (l ActivityLogReferenceList) Length() int {
   138  	return len(l)
   139  }
   140  
   141  type ActivityLogParentNameList []*ParentName
   142  
   143  func (l ActivityLogParentNameList) Append(name gotenresource.Name) gotenresource.ParentNameList {
   144  	return append(l, name.(*ParentName))
   145  }
   146  
   147  func (l ActivityLogParentNameList) AppendList(list gotenresource.ParentNameList) gotenresource.ParentNameList {
   148  	return append(l, list.(ActivityLogParentNameList)...)
   149  }
   150  
   151  func (l ActivityLogParentNameList) Slice(first, second int) gotenresource.ParentNameList {
   152  	if first > 0 && second > 0 {
   153  		return l[first:second]
   154  	} else if first > 0 {
   155  		return l[first:]
   156  	} else if second > 0 {
   157  		return l[:second]
   158  	}
   159  	return l[:]
   160  }
   161  
   162  func (l ActivityLogParentNameList) At(idx int) gotenresource.Name {
   163  	return l[idx]
   164  }
   165  
   166  func (l ActivityLogParentNameList) Set(idx int, name gotenresource.Name) {
   167  	l[idx] = name.(*ParentName)
   168  }
   169  
   170  func (l ActivityLogParentNameList) Length() int {
   171  	return len(l)
   172  }
   173  
   174  type ActivityLogParentReferenceList []*ParentReference
   175  
   176  func (l ActivityLogParentReferenceList) Append(ref gotenresource.Reference) gotenresource.ParentReferenceList {
   177  	return append(l, ref.(*ParentReference))
   178  }
   179  
   180  func (l ActivityLogParentReferenceList) AppendList(list gotenresource.ParentReferenceList) gotenresource.ParentReferenceList {
   181  	return append(l, list.(ActivityLogParentReferenceList)...)
   182  }
   183  
   184  func (l ActivityLogParentReferenceList) Slice(first, second int) gotenresource.ParentReferenceList {
   185  	if first > 0 && second > 0 {
   186  		return l[first:second]
   187  	} else if first > 0 {
   188  		return l[first:]
   189  	} else if second > 0 {
   190  		return l[:second]
   191  	}
   192  	return l[:]
   193  }
   194  
   195  func (l ActivityLogParentReferenceList) At(idx int) gotenresource.Reference {
   196  	return l[idx]
   197  }
   198  
   199  func (l ActivityLogParentReferenceList) Set(idx int, ref gotenresource.Reference) {
   200  	l[idx] = ref.(*ParentReference)
   201  }
   202  
   203  func (l ActivityLogParentReferenceList) Length() int {
   204  	return len(l)
   205  }
   206  
   207  type ActivityLogMap map[Name]*ActivityLog
   208  
   209  func (m ActivityLogMap) Get(name gotenresource.Name) gotenresource.Resource {
   210  	return m[*name.(*Name)]
   211  }
   212  
   213  func (m ActivityLogMap) Set(res gotenresource.Resource) {
   214  	tRes := res.(*ActivityLog)
   215  	m[*tRes.Name] = tRes
   216  }
   217  
   218  func (m ActivityLogMap) Delete(name gotenresource.Name) {
   219  	delete(m, *name.(*Name))
   220  }
   221  
   222  func (m ActivityLogMap) Length() int {
   223  	return len(m)
   224  }
   225  
   226  func (m ActivityLogMap) ForEach(cb func(gotenresource.Name, gotenresource.Resource) bool) {
   227  	for name, res := range m {
   228  		if !cb(&name, res) {
   229  			break
   230  		}
   231  	}
   232  }